Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error array numerics #6420

Merged
merged 21 commits into from
Aug 26, 2024
Merged

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Aug 15, 2024

Description

This PR fixes: #6376

The issue is that we use the first element of the array as its element type. This can be problematic as the first element is not "concrete". For example, when it is Numeric.

Now we iterate the array elements, search for the first "good" element, and use its type as the array type. This means:
1 - if the type is concrete, we use it;
2 - if the type is Numeric, we keep searching for something better;

This allows consistent arrays, but where the concrete types are at the end.

let a = [1, 2u8]; <- we will choose u8
let a = [None, Some(1), Some(2u8)]; <- we will choose Option<u8>, instead of Option<T>

snapshot tests

This PR also brings an experiment. Now when an "e2e" test has a file snapshot.toml it will run as cargo insta snapshot tests. These tests can be run as normal: cargo r -p test, and in two new ways:

> cargo t -p test
> cargo insta test

Snapshots can be reviewed using normal "cargo insta" workflow.

The secret lies in https://github.com/LukasKalbertodt/libtest-mimic. I also want to suggest that all our tests migrate to this model, where we could just use "cargo test" normally. Apart from that, I opted to use the forc executable, which means tests will run in parallel. In the future, if we want to poke compiler internals, we can expose them using flags, or create a special binary to fit our needs.

snapshot.toml is still empty because I have no idea to what put there at the moment. My initial idea was to configure what ends up into snapshots (multiple runs, compiler flags, script/contract calls) etc... But for the moment, empty is enough.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

Copy link

Benchmark for a0deb0b

Click to view benchmark
Test Base PR %
code_action 5.2±0.08ms 5.2±0.07ms 0.00%
code_lens 292.0±7.96ns 296.8±11.03ns +1.64%
compile 2.7±0.05s 2.6±0.04s -3.70%
completion 4.7±0.04ms 4.7±0.05ms 0.00%
did_change_with_caching 2.6±0.03s 2.6±0.02s 0.00%
document_symbol 905.6±28.75µs 889.8±52.15µs -1.74%
format 83.2±0.98ms 82.5±1.62ms -0.84%
goto_definition 336.5±6.81µs 338.0±5.37µs +0.45%
highlight 9.0±0.08ms 9.1±0.15ms +1.11%
hover 489.1±6.03µs 490.7±8.55µs +0.33%
idents_at_position 117.5±0.48µs 121.2±1.60µs +3.15%
inlay_hints 641.3±19.23µs 648.3±19.75µs +1.09%
on_enter 2.3±0.03µs 2.0±0.06µs -13.04%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 333.9±3.06µs 338.9±7.50µs +1.50%
rename 9.4±0.10ms 9.3±0.12ms -1.06%
semantic_tokens 1141.2±37.23µs 1228.2±12.73µs +7.62%
token_at_position 338.7±2.35µs 337.9±2.68µs -0.24%
tokens_at_position 3.7±0.06ms 3.7±0.05ms 0.00%
tokens_for_file 463.4±1.99µs 394.8±4.22µs -14.80%
traverse 37.6±1.24ms 36.6±0.72ms -2.66%

@xunilrj xunilrj force-pushed the xunilrj/better-error-array-numerics branch from 9e149c6 to 7332e18 Compare August 16, 2024 13:09
Copy link

Benchmark for 4c3ff5d

Click to view benchmark
Test Base PR %
code_action 5.2±0.01ms 5.2±0.08ms 0.00%
code_lens 286.7±7.24ns 286.6±7.52ns -0.03%
compile 2.7±0.04s 2.7±0.04s 0.00%
completion 4.7±0.03ms 4.7±0.06ms 0.00%
did_change_with_caching 2.6±0.04s 2.6±0.04s 0.00%
document_symbol 886.1±39.17µs 888.6±32.54µs +0.28%
format 72.0±0.99ms 72.1±0.59ms +0.14%
goto_definition 333.9±7.31µs 333.5±7.01µs -0.12%
highlight 9.1±0.14ms 9.1±0.04ms 0.00%
hover 485.9±5.54µs 489.4±7.61µs +0.72%
idents_at_position 118.9±0.38µs 118.5±0.71µs -0.34%
inlay_hints 636.0±20.85µs 648.2±25.41µs +1.92%
on_enter 2.1±0.04µs 2.1±0.06µs 0.00%
parent_decl_at_position 3.7±0.03ms 3.7±0.02ms 0.00%
prepare_rename 334.5±4.74µs 340.3±23.05µs +1.73%
rename 9.4±0.07ms 9.4±0.08ms 0.00%
semantic_tokens 1162.0±18.58µs 1187.3±17.40µs +2.18%
token_at_position 328.4±4.86µs 335.2±1.56µs +2.07%
tokens_at_position 3.7±0.03ms 3.7±0.02ms 0.00%
tokens_for_file 399.3±3.25µs 403.8±6.99µs +1.13%
traverse 34.8±0.81ms 34.5±0.72ms -0.86%

Copy link

Benchmark for 8ee81cc

Click to view benchmark
Test Base PR %
code_action 5.3±0.42ms 5.1±0.11ms -3.77%
code_lens 286.6±7.88ns 300.2±8.62ns +4.75%
compile 2.7±0.06s 2.7±0.07s 0.00%
completion 4.7±0.07ms 4.6±0.07ms -2.13%
did_change_with_caching 2.6±0.04s 2.6±0.04s 0.00%
document_symbol 874.0±29.55µs 938.2±33.53µs +7.35%
format 74.5±0.95ms 71.8±1.30ms -3.62%
goto_definition 336.9±10.15µs 346.5±7.58µs +2.85%
highlight 9.1±0.18ms 8.7±0.09ms -4.40%
hover 489.8±6.82µs 503.0±6.82µs +2.69%
idents_at_position 118.7±1.45µs 119.2±0.51µs +0.42%
inlay_hints 637.7±29.70µs 624.4±31.16µs -2.09%
on_enter 1960.7±116.19ns 2.1±0.06µs +7.10%
parent_decl_at_position 3.7±0.04ms 3.6±0.06ms -2.70%
prepare_rename 346.4±6.37µs 341.3±6.50µs -1.47%
rename 9.4±0.12ms 9.3±0.24ms -1.06%
semantic_tokens 1153.7±20.46µs 1246.9±50.43µs +8.08%
token_at_position 328.9±3.21µs 335.2±4.93µs +1.92%
tokens_at_position 3.7±0.01ms 3.6±0.05ms -2.70%
tokens_for_file 398.9±2.70µs 404.5±4.88µs +1.40%
traverse 34.5±0.65ms 35.6±0.91ms +3.19%

@xunilrj xunilrj self-assigned this Aug 16, 2024
@xunilrj xunilrj marked this pull request as ready for review August 16, 2024 20:01
@xunilrj xunilrj requested review from a team as code owners August 16, 2024 20:01
@Voxelot
Copy link
Member

Voxelot commented Aug 17, 2024

+1 for libtest mimic, we've been using it over in the fuel-core repo already as well.

Copy link
Member

@ironcev ironcev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that we are starting with snapshot tests!! 💯 🥇 Can we just add to the README.md of the e2e_vm_tests short instructions how to use them? Basically this what is written in the PR description.

@xunilrj
Copy link
Contributor Author

xunilrj commented Aug 19, 2024

Great that we are starting with snapshot tests!! 💯 🥇 Can we just add to the README.md of the e2e_vm_tests short instructions how to use them? Basically this what is written in the PR description.

Done.

Copy link

Benchmark for 30f23e8

Click to view benchmark
Test Base PR %
code_action 5.3±0.05ms 5.1±0.03ms -3.77%
code_lens 299.6±8.12ns 307.7±13.43ns +2.70%
compile 2.7±0.06s 2.7±0.04s 0.00%
completion 4.7±0.05ms 4.6±0.08ms -2.13%
did_change_with_caching 2.6±0.05s 2.7±0.03s +3.85%
document_symbol 850.7±14.92µs 857.9±13.65µs +0.85%
format 71.2±1.67ms 72.2±1.04ms +1.40%
goto_definition 338.2±6.62µs 350.4±11.15µs +3.61%
highlight 9.1±0.02ms 8.7±0.12ms -4.40%
hover 493.2±4.39µs 497.5±5.23µs +0.87%
idents_at_position 121.3±0.26µs 119.6±4.83µs -1.40%
inlay_hints 632.8±6.43µs 632.7±22.34µs -0.02%
on_enter 2.1±0.06µs 1886.7±25.11ns -10.16%
parent_decl_at_position 3.7±0.07ms 3.5±0.04ms -5.41%
prepare_rename 333.4±4.36µs 343.5±5.92µs +3.03%
rename 9.4±0.04ms 9.0±0.46ms -4.26%
semantic_tokens 1246.7±12.76µs 1265.4±12.28µs +1.50%
token_at_position 337.1±4.26µs 330.9±2.52µs -1.84%
tokens_at_position 3.7±0.03ms 3.6±0.10ms -2.70%
tokens_for_file 398.9±12.45µs 401.3±3.16µs +0.60%
traverse 34.1±0.88ms 35.5±0.97ms +4.11%

Copy link

Benchmark for 80f8904

Click to view benchmark
Test Base PR %
code_action 5.3±0.09ms 5.1±0.10ms -3.77%
code_lens 289.5±10.78ns 303.1±6.37ns +4.70%
compile 2.7±0.06s 2.7±0.04s 0.00%
completion 4.7±0.03ms 4.5±0.06ms -4.26%
did_change_with_caching 2.6±0.05s 2.6±0.03s 0.00%
document_symbol 853.0±24.11µs 934.7±25.83µs +9.58%
format 72.2±1.40ms 70.8±1.08ms -1.94%
goto_definition 339.7±7.47µs 337.7±6.59µs -0.59%
highlight 9.1±0.09ms 8.7±0.10ms -4.40%
hover 490.4±3.65µs 492.3±7.29µs +0.39%
idents_at_position 118.8±0.53µs 118.5±0.28µs -0.25%
inlay_hints 647.5±27.06µs 631.3±24.68µs -2.50%
on_enter 2.1±0.03µs 2.0±0.08µs -4.76%
parent_decl_at_position 3.7±0.01ms 3.6±0.04ms -2.70%
prepare_rename 335.0±5.45µs 336.2±5.87µs +0.36%
rename 9.4±0.13ms 9.0±0.15ms -4.26%
semantic_tokens 1205.7±14.91µs 1222.7±11.21µs +1.41%
token_at_position 330.9±1.67µs 332.2±1.68µs +0.39%
tokens_at_position 3.7±0.03ms 3.5±0.03ms -5.41%
tokens_for_file 398.8±2.52µs 404.5±2.52µs +1.43%
traverse 33.9±0.74ms 34.4±0.80ms +1.47%

@xunilrj xunilrj requested review from ironcev and a team August 19, 2024 09:08
@tritao
Copy link
Contributor

tritao commented Aug 19, 2024

About switching to libtest mimic, what is your idea on how it should be done?

I assume the idea is we would get rid of our test running code test, which would now be rewritten (or replaced by another target) on top of libtest mimic.

Upon an initial look at it, from its docs, looks like output capture and --nocapture are not supported. It redirects for LukasKalbertodt/libtest-mimic#9 for more information, and looks like its not going to be supported.

This means we lose the way to see individual test outputs when running the test suite (LukasKalbertodt/libtest-mimic#9).

Another potential issue is the filtering support we have built in our test runner over time, which we would need to reimplement on top of the new system.

It certainly seems appealing to offload some of this test running code, but my concern is we might not be easily able to extend in the future if we needed.

What are we gaining by introducing libtest mimic? Is it just to make the output as similiar to cargo test? Or is there anything else?

@xunilrj
Copy link
Contributor Author

xunilrj commented Aug 19, 2024

This means we lose the way to see individual test outputs when running the test suite (LukasKalbertodt/libtest-mimic#9).

We can still use what we have: gag would still work, but ideally, we would move to a better model, allowing us to run more tests in parallel.

I think that for compilation, we can use the forc executable like I am doing for snapshots. cargo insta would be much better for warnings/errors for both should_pass and should_fail tests.

For tests that need the VM to run, we can keep what we have because we do not capture output, right?

For "IR generation tests", we could change them to start using forc and use cargo insta with --ir initial. But they would work as is now.

"sdk harness" can also benefit from this workflow, but we would need to build the sway code using build.rs, because of all the macros that need access to the ABI jsons. So I would probably keep them in a different binary and only compile them when needed.

Another potential issue is the filtering support we have built in our test runner over time, which we would need to reimplement on top of the new system.

I think we have two options. One is to keep the current filter and only return the filtered tests to libmimic_test. The only difference I would propose is that when no filter is specified, we would expand all tests and all options. For example, no filter runs both debug AND release etc...

A second option would be to always expand every single option, and let cargo t filter do its thing. So for example, instead of

> cargo r -p test -- --abi-only

It could be something like

> cargo r -p test -- "(abi)"

This would work because our "test finder" can append "(abi)" when a test, tests the abi. I think we can think of something similar to other cases.

What are we gaining by introducing libtest mimic? Is it just to make the output as similiar to cargo test? Or is there anything else?

I think the biggest gain would be that our tests would be more "standard rust tests", which means they would work with the rest of the ecosystem. cargo insta, cargo nextest are two examples.

Maybe even things like: https://github.com/swellaby/vscode-rust-test-adapter

But, for me, honestly, would be that cargo t actually tests everything.

@xunilrj xunilrj force-pushed the xunilrj/better-error-array-numerics branch from dafae1d to e928b9c Compare August 21, 2024 11:30
Copy link

Benchmark for 496f79c

Click to view benchmark
Test Base PR %
code_action 5.0±0.07ms 5.3±0.19ms +6.00%
code_lens 301.6±11.70ns 302.2±15.23ns +0.20%
compile 2.7±0.05s 2.8±0.04s +3.70%
completion 4.5±0.07ms 4.7±0.14ms +4.44%
did_change_with_caching 2.6±0.06s 2.7±0.04s +3.85%
document_symbol 927.1±40.68µs 862.5±17.53µs -6.97%
format 68.1±0.68ms 68.2±0.92ms +0.15%
goto_definition 341.2±6.84µs 360.9±14.34µs +5.77%
highlight 8.9±0.32ms 8.9±0.27ms 0.00%
hover 487.6±5.04µs 581.8±7.79µs +19.32%
idents_at_position 117.9±0.66µs 117.6±0.56µs -0.25%
inlay_hints 632.4±22.03µs 644.7±31.76µs +1.94%
on_enter 2.1±0.05µs 2.0±0.09µs -4.76%
parent_decl_at_position 3.6±0.04ms 3.6±0.04ms 0.00%
prepare_rename 336.8±4.74µs 395.4±8.59µs +17.40%
rename 9.0±0.14ms 9.2±0.16ms +2.22%
semantic_tokens 1170.4±11.07µs 1265.0±11.60µs +8.08%
token_at_position 342.4±4.65µs 348.5±6.53µs +1.78%
tokens_at_position 3.6±0.06ms 3.7±0.12ms +2.78%
tokens_for_file 402.8±6.06µs 409.3±4.34µs +1.61%
traverse 34.5±0.67ms 34.8±0.94ms +0.87%

Copy link

Benchmark for 03bb5de

Click to view benchmark
Test Base PR %
code_action 5.1±0.09ms 5.1±0.14ms 0.00%
code_lens 292.2±10.52ns 290.5±9.92ns -0.58%
compile 2.7±0.06s 2.7±0.05s 0.00%
completion 4.6±0.24ms 4.5±0.05ms -2.17%
did_change_with_caching 2.6±0.03s 2.5±0.04s -3.85%
document_symbol 844.3±17.39µs 910.8±38.67µs +7.88%
format 67.1±0.58ms 68.1±0.56ms +1.49%
goto_definition 345.5±10.73µs 339.8±5.41µs -1.65%
highlight 8.8±0.13ms 8.8±0.05ms 0.00%
hover 501.1±6.40µs 497.8±6.70µs -0.66%
idents_at_position 118.4±0.46µs 118.9±1.01µs +0.42%
inlay_hints 635.0±14.50µs 639.1±23.07µs +0.65%
on_enter 1914.3±35.52ns 2.1±0.04µs +9.70%
parent_decl_at_position 3.6±0.06ms 3.6±0.03ms 0.00%
prepare_rename 341.1±5.01µs 341.0±10.00µs -0.03%
rename 9.0±0.03ms 9.2±0.39ms +2.22%
semantic_tokens 1181.1±16.24µs 1211.2±7.64µs +2.55%
token_at_position 339.3±2.75µs 336.2±4.42µs -0.91%
tokens_at_position 3.6±0.03ms 3.6±0.04ms 0.00%
tokens_for_file 405.5±2.82µs 404.8±3.35µs -0.17%
traverse 35.1±0.95ms 35.0±0.68ms -0.28%

test/tests/tests.rs Outdated Show resolved Hide resolved
tritao
tritao previously approved these changes Aug 22, 2024
Copy link
Contributor

@tritao tritao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left just some minor suggestion.

IGI-111
IGI-111 previously approved these changes Aug 23, 2024
Copy link

Benchmark for 061859d

Click to view benchmark
Test Base PR %
code_action 5.3±0.08ms 5.3±0.12ms 0.00%
code_lens 286.1±7.42ns 284.7±10.30ns -0.49%
compile 2.7±0.08s 2.7±0.09s 0.00%
completion 4.8±0.13ms 4.7±0.10ms -2.08%
did_change_with_caching 2.6±0.04s 2.6±0.04s 0.00%
document_symbol 912.8±22.21µs 883.3±50.70µs -3.23%
format 69.7±1.09ms 70.1±1.15ms +0.57%
goto_definition 342.7±6.67µs 340.5±7.02µs -0.64%
highlight 9.1±0.06ms 9.1±0.04ms 0.00%
hover 494.7±5.58µs 495.8±8.60µs +0.22%
idents_at_position 117.8±0.53µs 117.2±0.67µs -0.51%
inlay_hints 641.3±6.91µs 641.4±8.07µs +0.02%
on_enter 1985.6±76.27ns 2.1±0.06µs +5.76%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 338.4±6.87µs 338.7±7.94µs +0.09%
rename 9.5±0.16ms 9.4±0.12ms -1.05%
semantic_tokens 1189.3±12.65µs 1223.9±10.79µs +2.91%
token_at_position 327.1±2.62µs 334.6±2.57µs +2.29%
tokens_at_position 3.7±0.05ms 3.7±0.05ms 0.00%
tokens_for_file 402.1±2.22µs 405.6±2.64µs +0.87%
traverse 34.5±0.76ms 34.2±0.98ms -0.87%

Copy link

Benchmark for e322267

Click to view benchmark
Test Base PR %
code_action 5.2±0.20ms 5.4±0.24ms +3.85%
code_lens 283.4±7.48ns 288.8±17.63ns +1.91%
compile 2.9±0.03s 2.8±0.04s -3.45%
completion 4.7±0.22ms 4.6±0.21ms -2.13%
did_change_with_caching 2.7±0.07s 2.7±0.05s 0.00%
document_symbol 900.2±46.20µs 944.5±43.40µs +4.92%
format 71.5±1.09ms 70.5±1.01ms -1.40%
goto_definition 339.5±6.84µs 350.1±7.28µs +3.12%
highlight 8.8±0.21ms 8.9±0.18ms +1.14%
hover 491.9±8.04µs 504.9±10.02µs +2.64%
idents_at_position 118.2±0.77µs 118.7±1.63µs +0.42%
inlay_hints 635.4±25.20µs 642.3±25.70µs +1.09%
on_enter 2.0±0.08µs 2.0±0.08µs 0.00%
parent_decl_at_position 3.7±0.13ms 3.6±0.07ms -2.70%
prepare_rename 341.5±5.50µs 347.0±4.73µs +1.61%
rename 9.1±0.20ms 9.2±0.33ms +1.10%
semantic_tokens 1187.0±60.11µs 1227.4±23.32µs +3.40%
token_at_position 339.7±3.83µs 341.2±5.09µs +0.44%
tokens_at_position 3.6±0.09ms 3.6±0.07ms 0.00%
tokens_for_file 404.2±5.22µs 406.5±5.86µs +0.57%
traverse 36.4±1.06ms 36.1±0.79ms -0.82%

Copy link

Benchmark for 08445df

Click to view benchmark
Test Base PR %
code_action 5.1±0.10ms 5.1±0.01ms 0.00%
code_lens 283.7±5.44ns 284.3±5.52ns +0.21%
compile 2.7±0.06s 2.7±0.05s 0.00%
completion 4.5±0.05ms 4.6±0.01ms +2.22%
did_change_with_caching 2.6±0.02s 2.6±0.05s 0.00%
document_symbol 886.5±16.34µs 915.6±25.10µs +3.28%
format 69.4±0.85ms 69.7±0.92ms +0.43%
goto_definition 339.4±3.42µs 348.5±3.40µs +2.68%
highlight 8.7±0.10ms 8.7±0.01ms 0.00%
hover 495.4±6.32µs 506.9±5.61µs +2.32%
idents_at_position 121.9±0.22µs 118.5±0.75µs -2.79%
inlay_hints 634.1±27.16µs 629.7±7.57µs -0.69%
on_enter 1879.0±23.41ns 2.0±0.06µs +6.44%
parent_decl_at_position 3.6±0.03ms 3.6±0.02ms 0.00%
prepare_rename 340.7±9.21µs 344.2±6.79µs +1.03%
rename 9.0±0.12ms 9.1±0.28ms +1.11%
semantic_tokens 1203.4±12.31µs 1260.6±18.20µs +4.75%
token_at_position 334.5±2.57µs 339.2±2.50µs +1.41%
tokens_at_position 3.6±0.06ms 3.6±0.03ms 0.00%
tokens_for_file 401.1±5.95µs 403.4±2.20µs +0.57%
traverse 34.3±1.11ms 34.3±0.74ms 0.00%

@xunilrj xunilrj dismissed stale reviews from IGI-111 and tritao via 9c9c05e August 26, 2024 12:20
@xunilrj xunilrj force-pushed the xunilrj/better-error-array-numerics branch from d4bf38a to 9c9c05e Compare August 26, 2024 12:20
Copy link

Benchmark for d00b206

Click to view benchmark
Test Base PR %
code_action 5.2±0.13ms 5.3±0.13ms +1.92%
code_lens 288.0±5.73ns 289.2±9.21ns +0.42%
compile 2.8±0.06s 2.8±0.08s 0.00%
completion 4.6±0.08ms 4.8±0.15ms +4.35%
did_change_with_caching 2.7±0.05s 2.7±0.08s 0.00%
document_symbol 935.2±21.35µs 910.9±37.42µs -2.60%
format 72.5±0.91ms 72.1±0.68ms -0.55%
goto_definition 337.6±6.43µs 334.4±7.63µs -0.95%
highlight 8.7±0.09ms 9.2±0.67ms +5.75%
hover 489.0±5.03µs 486.4±4.03µs -0.53%
idents_at_position 117.6±0.35µs 118.0±0.41µs +0.34%
inlay_hints 620.9±22.54µs 637.4±33.91µs +2.66%
on_enter 2.0±0.03µs 2.0±0.02µs 0.00%
parent_decl_at_position 3.6±0.03ms 3.7±0.09ms +2.78%
prepare_rename 338.8±6.69µs 337.8±6.93µs -0.30%
rename 9.6±0.11ms 9.4±0.19ms -2.08%
semantic_tokens 1152.9±13.79µs 1268.4±16.32µs +10.02%
token_at_position 332.2±3.41µs 335.5±3.02µs +0.99%
tokens_at_position 3.6±0.02ms 3.7±0.07ms +2.78%
tokens_for_file 398.9±4.33µs 403.3±3.10µs +1.10%
traverse 35.6±0.77ms 35.8±0.77ms +0.56%

Copy link

Benchmark for 5021abe

Click to view benchmark
Test Base PR %
code_action 5.3±0.14ms 5.1±0.15ms -3.77%
code_lens 284.7±7.89ns 287.9±16.80ns +1.12%
compile 2.9±0.04s 2.8±0.05s -3.45%
completion 4.7±0.14ms 4.6±0.11ms -2.13%
did_change_with_caching 2.8±0.03s 2.6±0.03s -7.14%
document_symbol 877.4±29.14µs 854.7±23.29µs -2.59%
format 75.4±1.42ms 71.6±1.27ms -5.04%
goto_definition 337.5±9.10µs 339.9±8.05µs +0.71%
highlight 9.0±0.16ms 8.8±0.13ms -2.22%
hover 496.2±8.56µs 495.0±6.07µs -0.24%
idents_at_position 117.3±0.29µs 116.9±0.74µs -0.34%
inlay_hints 629.7±25.20µs 629.7±17.11µs 0.00%
on_enter 2.0±0.10µs 1915.8±44.39ns -4.21%
parent_decl_at_position 3.7±0.06ms 3.6±0.04ms -2.70%
prepare_rename 336.0±5.61µs 338.4±6.12µs +0.71%
rename 9.6±0.23ms 9.1±0.14ms -5.21%
semantic_tokens 1189.5±26.60µs 1244.4±16.75µs +4.62%
token_at_position 332.5±3.20µs 411.2±2.72µs +23.67%
tokens_at_position 3.7±0.05ms 3.6±0.05ms -2.70%
tokens_for_file 401.5±3.08µs 402.8±3.71µs +0.32%
traverse 36.6±0.97ms 36.8±0.72ms +0.55%

@xunilrj xunilrj requested review from tritao and IGI-111 August 26, 2024 13:08
@IGI-111 IGI-111 enabled auto-merge (squash) August 26, 2024 13:15
@IGI-111 IGI-111 merged commit 9403cd0 into master Aug 26, 2024
36 checks passed
@IGI-111 IGI-111 deleted the xunilrj/better-error-array-numerics branch August 26, 2024 13:28
Copy link

Benchmark for 0b582b3

Click to view benchmark
Test Base PR %
code_action 5.2±0.03ms 5.1±0.04ms -1.92%
code_lens 287.6±9.07ns 284.9±9.42ns -0.94%
compile 2.7±0.05s 2.8±0.03s +3.70%
completion 4.7±0.06ms 4.6±0.06ms -2.13%
did_change_with_caching 2.6±0.03s 2.7±0.03s +3.85%
document_symbol 924.8±33.12µs 868.9±34.88µs -6.04%
format 71.4±0.94ms 71.6±2.59ms +0.28%
goto_definition 336.8±6.89µs 337.3±5.36µs +0.15%
highlight 9.0±0.01ms 8.7±0.16ms -3.33%
hover 492.5±7.47µs 493.3±4.43µs +0.16%
idents_at_position 118.7±0.37µs 118.2±0.71µs -0.42%
inlay_hints 639.8±21.74µs 635.8±28.04µs -0.63%
on_enter 2.0±0.05µs 2.0±0.09µs 0.00%
parent_decl_at_position 3.7±0.02ms 3.6±0.03ms -2.70%
prepare_rename 337.9±6.76µs 342.4±6.63µs +1.33%
rename 9.6±1.05ms 9.0±0.11ms -6.25%
semantic_tokens 1233.1±12.78µs 1211.0±10.01µs -1.79%
token_at_position 330.3±1.70µs 344.4±2.07µs +4.27%
tokens_at_position 3.7±0.04ms 3.5±0.03ms -5.41%
tokens_for_file 400.3±2.63µs 397.2±5.61µs -0.77%
traverse 34.9±0.65ms 35.2±0.51ms +0.86%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implicit Casting of Array Elements
5 participants