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

Fixes to accessing the data section during bytecode gen #5927

Merged
merged 17 commits into from
May 6, 2024

Conversation

vaivaswatha
Copy link
Contributor

@vaivaswatha vaivaswatha commented Apr 26, 2024

Description

This PR fixes a bunch of issues we had in generating access to the data section. It also fixes #5876.

Reverts #5918.

@vaivaswatha vaivaswatha self-assigned this Apr 26, 2024
Copy link

Benchmark for 38d42ad

Click to view benchmark
Test Base PR %
code_action 5.6±0.09ms 5.5±0.04ms -1.79%
code_lens 346.1±10.68ns 289.8±4.04ns -16.27%
compile 6.1±0.03s 6.2±0.03s +1.64%
completion 4.9±0.07ms 5.0±0.06ms +2.04%
did_change_with_caching 6.1±0.08s 6.0±0.06s -1.64%
document_symbol 978.7±45.24µs 926.6±23.89µs -5.32%
format 69.8±1.40ms 71.1±1.06ms +1.86%
goto_definition 364.5±3.63µs 362.3±3.88µs -0.60%
highlight 9.0±0.14ms 9.0±0.01ms 0.00%
hover 614.2±21.41µs 600.2±8.28µs -2.28%
idents_at_position 123.8±1.40µs 122.9±0.81µs -0.73%
inlay_hints 669.8±27.13µs 669.2±20.23µs -0.09%
on_enter 493.1±18.79ns 489.3±54.40ns -0.77%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 363.0±5.94µs 360.7±6.39µs -0.63%
rename 9.6±0.08ms 9.6±0.03ms 0.00%
semantic_tokens 1033.0±24.90µs 1023.0±12.13µs -0.97%
token_at_position 357.4±1.83µs 358.8±2.80µs +0.39%
tokens_at_position 3.7±0.07ms 3.7±0.05ms 0.00%
tokens_for_file 421.8±2.18µs 422.7±1.68µs +0.21%
traverse 49.8±1.96ms 50.2±1.80ms +0.80%

Copy link

Benchmark for a8aa3c0

Click to view benchmark
Test Base PR %
code_action 5.5±0.06ms 5.5±0.01ms 0.00%
code_lens 345.3±11.49ns 312.9±9.88ns -9.38%
compile 6.2±0.06s 6.2±0.06s 0.00%
completion 5.0±0.04ms 5.0±0.06ms 0.00%
did_change_with_caching 6.1±0.08s 6.2±0.06s +1.64%
document_symbol 965.2±25.37µs 1005.2±42.78µs +4.14%
format 72.0±1.11ms 70.4±3.59ms -2.22%
goto_definition 363.9±7.96µs 366.3±6.99µs +0.66%
highlight 9.0±0.14ms 9.1±0.25ms +1.11%
hover 609.2±10.95µs 608.4±20.86µs -0.13%
idents_at_position 122.4±0.43µs 128.5±0.77µs +4.98%
inlay_hints 663.4±14.03µs 679.2±42.68µs +2.38%
on_enter 490.0±11.37ns 492.6±14.23ns +0.53%
parent_decl_at_position 3.7±0.02ms 3.7±0.04ms 0.00%
prepare_rename 358.2±7.74µs 364.3±3.43µs +1.70%
rename 9.6±0.11ms 9.6±0.02ms 0.00%
semantic_tokens 1012.6±12.99µs 1069.9±68.85µs +5.66%
token_at_position 355.8±2.57µs 367.2±3.93µs +3.20%
tokens_at_position 3.7±0.02ms 3.8±0.06ms +2.70%
tokens_for_file 422.4±8.25µs 420.6±2.83µs -0.43%
traverse 52.2±2.20ms 51.2±2.98ms -1.92%

Copy link

Benchmark for 70f4aa5

Click to view benchmark
Test Base PR %
code_action 5.6±0.11ms 5.8±0.16ms +3.57%
code_lens 346.3±8.15ns 288.3±15.47ns -16.75%
compile 6.4±0.07s 6.4±0.06s 0.00%
completion 5.1±0.16ms 5.1±0.14ms 0.00%
did_change_with_caching 6.4±0.06s 6.3±0.07s -1.56%
document_symbol 957.1±21.79µs 995.3±50.70µs +3.99%
format 73.3±1.11ms 75.1±1.21ms +2.46%
goto_definition 358.0±5.15µs 360.4±4.79µs +0.67%
highlight 9.1±0.15ms 9.1±0.13ms 0.00%
hover 602.3±12.65µs 609.0±30.08µs +1.11%
idents_at_position 123.3±0.37µs 122.3±1.21µs -0.81%
inlay_hints 667.2±22.99µs 681.1±29.23µs +2.08%
on_enter 490.0±13.91ns 487.8±15.82ns -0.45%
parent_decl_at_position 3.8±0.04ms 3.8±0.03ms 0.00%
prepare_rename 360.7±7.79µs 362.5±9.55µs +0.50%
rename 9.9±0.19ms 9.9±0.20ms 0.00%
semantic_tokens 1022.6±10.00µs 1042.1±19.65µs +1.91%
token_at_position 362.1±2.97µs 355.2±2.39µs -1.91%
tokens_at_position 3.8±0.03ms 3.8±0.04ms 0.00%
tokens_for_file 418.0±2.67µs 425.6±3.01µs +1.82%
traverse 52.7±2.17ms 50.2±2.22ms -4.74%

Copy link

Benchmark for 031298c

Click to view benchmark
Test Base PR %
code_action 5.6±0.12ms 5.5±0.08ms -1.79%
code_lens 331.0±9.18ns 306.9±9.44ns -7.28%
compile 6.1±0.05s 6.1±0.05s 0.00%
completion 5.1±0.20ms 5.0±0.02ms -1.96%
did_change_with_caching 6.2±0.07s 6.2±0.06s 0.00%
document_symbol 946.6±31.96µs 943.9±20.75µs -0.29%
format 70.2±1.20ms 70.5±1.38ms +0.43%
goto_definition 361.8±8.98µs 361.4±6.09µs -0.11%
highlight 9.2±0.32ms 9.3±0.11ms +1.09%
hover 627.5±34.09µs 598.6±18.78µs -4.61%
idents_at_position 122.5±0.80µs 123.2±1.90µs +0.57%
inlay_hints 657.2±8.04µs 668.0±17.36µs +1.64%
on_enter 517.5±8.92ns 491.7±15.82ns -4.99%
parent_decl_at_position 3.7±0.04ms 3.8±0.12ms +2.70%
prepare_rename 368.5±16.77µs 360.7±4.71µs -2.12%
rename 9.6±0.17ms 9.6±0.15ms 0.00%
semantic_tokens 1038.3±24.96µs 1027.1±35.02µs -1.08%
token_at_position 359.1±2.69µs 360.5±27.17µs +0.39%
tokens_at_position 3.7±0.06ms 3.9±0.22ms +5.41%
tokens_for_file 421.7±1.52µs 422.2±3.41µs +0.12%
traverse 51.2±1.56ms 50.4±1.49ms -1.56%

Copy link

Benchmark for 5aea9a1

Click to view benchmark
Test Base PR %
code_action 6.0±0.22ms 5.5±0.09ms -8.33%
code_lens 327.6±11.72ns 294.7±10.67ns -10.04%
compile 6.4±0.11s 6.3±0.06s -1.56%
completion 5.0±0.10ms 5.0±0.05ms 0.00%
did_change_with_caching 6.1±0.08s 6.4±0.14s +4.92%
document_symbol 948.5±22.56µs 983.7±47.23µs +3.71%
format 71.5±1.30ms 73.6±0.65ms +2.94%
goto_definition 358.5±8.07µs 368.4±6.71µs +2.76%
highlight 9.2±0.27ms 9.2±0.12ms 0.00%
hover 602.0±15.12µs 612.5±22.12µs +1.74%
idents_at_position 122.7±5.06µs 123.7±1.70µs +0.81%
inlay_hints 671.6±36.68µs 688.8±57.20µs +2.56%
on_enter 494.5±11.55ns 497.0±19.70ns +0.51%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 357.5±4.66µs 368.1±10.01µs +2.97%
rename 10.3±0.25ms 9.7±0.30ms -5.83%
semantic_tokens 1029.1±25.49µs 1035.5±26.57µs +0.62%
token_at_position 351.5±2.84µs 367.5±3.82µs +4.55%
tokens_at_position 3.7±0.06ms 3.7±0.03ms 0.00%
tokens_for_file 415.5±4.77µs 424.1±4.56µs +2.07%
traverse 50.1±2.04ms 50.2±1.58ms +0.20%

Copy link

Benchmark for 14decb0

Click to view benchmark
Test Base PR %
code_action 5.6±0.04ms 5.4±0.11ms -3.57%
code_lens 331.4±14.50ns 315.1±9.90ns -4.92%
compile 6.3±0.08s 6.3±0.06s 0.00%
completion 5.0±0.11ms 4.8±0.13ms -4.00%
did_change_with_caching 6.2±0.08s 6.2±0.04s 0.00%
document_symbol 1035.7±14.69µs 944.3±36.00µs -8.82%
format 74.4±1.10ms 72.0±0.66ms -3.23%
goto_definition 360.6±5.98µs 361.2±4.04µs +0.17%
highlight 9.0±0.09ms 8.8±0.05ms -2.22%
hover 618.4±18.37µs 602.1±13.81µs -2.64%
idents_at_position 124.0±0.32µs 124.5±1.92µs +0.40%
inlay_hints 667.6±9.29µs 655.2±25.98µs -1.86%
on_enter 496.5±16.57ns 475.7±13.80ns -4.19%
parent_decl_at_position 3.7±0.03ms 3.6±0.05ms -2.70%
prepare_rename 365.1±4.93µs 362.6±5.99µs -0.68%
rename 9.7±0.12ms 9.3±0.16ms -4.12%
semantic_tokens 1042.7±9.92µs 1046.9±12.85µs +0.40%
token_at_position 356.4±3.10µs 355.4±3.32µs -0.28%
tokens_at_position 3.7±0.02ms 3.6±0.02ms -2.70%
tokens_for_file 423.7±3.37µs 424.3±1.71µs +0.14%
traverse 50.6±1.70ms 50.0±1.48ms -1.19%

Copy link

github-actions bot commented May 1, 2024

Benchmark for 8d97aa8

Click to view benchmark
Test Base PR %
code_action 5.3±0.14ms 5.5±0.02ms +3.77%
code_lens 303.6±9.80ns 304.4±14.24ns +0.26%
compile 6.3±0.05s 6.3±0.05s 0.00%
completion 4.8±0.08ms 4.9±0.13ms +2.08%
did_change_with_caching 6.1±0.08s 6.3±0.04s +3.28%
document_symbol 941.3±19.63µs 944.6±11.18µs +0.35%
format 87.6±1.59ms 88.1±1.47ms +0.57%
goto_definition 367.8±9.88µs 368.1±8.06µs +0.08%
highlight 8.7±0.21ms 9.0±0.02ms +3.45%
hover 609.3±17.70µs 610.2±25.46µs +0.15%
idents_at_position 126.2±0.67µs 123.3±1.26µs -2.30%
inlay_hints 656.0±13.48µs 666.4±21.94µs +1.59%
on_enter 478.5±12.89ns 479.2±17.80ns +0.15%
parent_decl_at_position 3.6±0.03ms 3.7±0.02ms +2.78%
prepare_rename 370.9±9.99µs 373.6±7.19µs +0.73%
rename 9.3±0.19ms 9.6±0.18ms +3.23%
semantic_tokens 1059.7±14.70µs 1038.9±21.10µs -1.96%
token_at_position 369.2±1.77µs 357.9±3.34µs -3.06%
tokens_at_position 3.6±0.03ms 3.7±0.03ms +2.78%
tokens_for_file 428.0±2.00µs 429.0±3.21µs +0.23%
traverse 51.7±2.34ms 52.5±2.10ms +1.55%

Copy link

github-actions bot commented May 3, 2024

Benchmark for e35b036

Click to view benchmark
Test Base PR %
code_action 5.4±0.01ms 5.5±0.07ms +1.85%
code_lens 291.6±9.56ns 287.9±7.62ns -1.27%
compile 6.2±0.04s 6.2±0.04s 0.00%
completion 4.9±0.01ms 5.2±0.10ms +6.12%
did_change_with_caching 6.2±0.05s 6.3±0.07s +1.61%
document_symbol 997.3±43.17µs 947.4±17.70µs -5.00%
format 87.8±1.26ms 87.4±1.26ms -0.46%
goto_definition 360.4±4.28µs 367.4±11.93µs +1.94%
highlight 8.9±0.18ms 8.9±0.02ms 0.00%
hover 597.7±24.64µs 605.5±22.74µs +1.31%
idents_at_position 122.3±0.39µs 123.1±0.68µs +0.65%
inlay_hints 664.7±15.59µs 712.4±29.18µs +7.18%
on_enter 496.6±11.66ns 475.2±17.60ns -4.31%
parent_decl_at_position 3.7±0.04ms 3.7±0.04ms 0.00%
prepare_rename 357.4±6.20µs 361.9±11.53µs +1.26%
rename 9.5±0.02ms 9.5±0.19ms 0.00%
semantic_tokens 1008.0±7.53µs 1048.9±13.35µs +4.06%
token_at_position 348.0±1.65µs 357.4±3.38µs +2.70%
tokens_at_position 3.7±0.02ms 3.7±0.02ms 0.00%
tokens_for_file 415.3±1.67µs 424.4±9.35µs +2.19%
traverse 49.6±1.08ms 49.8±1.87ms +0.40%

Copy link

github-actions bot commented May 3, 2024

Benchmark for a88dd26

Click to view benchmark
Test Base PR %
code_action 5.5±0.08ms 5.5±0.12ms 0.00%
code_lens 287.1±7.99ns 286.3±4.62ns -0.28%
compile 6.3±0.04s 6.3±0.05s 0.00%
completion 4.9±0.04ms 4.9±0.07ms 0.00%
did_change_with_caching 6.3±0.09s 6.3±0.11s 0.00%
document_symbol 990.6±35.14µs 937.3±19.33µs -5.38%
format 87.2±1.16ms 87.1±1.73ms -0.11%
goto_definition 360.0±7.27µs 359.2±6.59µs -0.22%
highlight 8.9±0.03ms 9.0±0.22ms +1.12%
hover 606.4±23.36µs 604.9±17.96µs -0.25%
idents_at_position 123.6±0.43µs 123.9±3.15µs +0.24%
inlay_hints 661.5±26.24µs 653.9±6.12µs -1.15%
on_enter 504.3±11.63ns 486.3±18.30ns -3.57%
parent_decl_at_position 3.7±0.03ms 3.7±0.26ms 0.00%
prepare_rename 359.7±6.42µs 358.6±3.77µs -0.31%
rename 9.6±0.66ms 9.6±0.17ms 0.00%
semantic_tokens 1026.3±34.98µs 1056.5±12.69µs +2.94%
token_at_position 348.7±2.70µs 358.4±2.80µs +2.78%
tokens_at_position 3.7±0.02ms 3.7±0.07ms 0.00%
tokens_for_file 420.0±2.19µs 470.3±1.84µs +11.98%
traverse 50.3±1.39ms 51.5±2.86ms +2.39%

Copy link

github-actions bot commented May 3, 2024

Benchmark for 53db1d2

Click to view benchmark
Test Base PR %
code_action 5.5±0.11ms 5.5±0.08ms 0.00%
code_lens 288.3±5.19ns 292.7±8.13ns +1.53%
compile 6.4±0.05s 6.6±0.07s +3.12%
completion 4.9±0.12ms 5.0±0.16ms +2.04%
did_change_with_caching 6.3±0.11s 6.6±0.09s +4.76%
document_symbol 1013.4±75.82µs 1020.2±33.93µs +0.67%
format 88.1±1.00ms 90.0±1.42ms +2.16%
goto_definition 362.4±11.15µs 362.5±5.56µs +0.03%
highlight 9.0±0.24ms 9.0±0.24ms 0.00%
hover 605.2±10.09µs 602.2±8.41µs -0.50%
idents_at_position 122.1±0.41µs 124.4±1.28µs +1.88%
inlay_hints 698.3±26.57µs 658.5±28.94µs -5.70%
on_enter 490.8±16.62ns 482.1±16.28ns -1.77%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 362.6±5.44µs 359.3±6.67µs -0.91%
rename 9.5±0.04ms 9.6±0.20ms +1.05%
semantic_tokens 1057.2±17.98µs 1040.3±16.95µs -1.60%
token_at_position 359.2±3.69µs 362.0±1.86µs +0.78%
tokens_at_position 3.7±0.03ms 3.7±0.06ms 0.00%
tokens_for_file 427.0±4.04µs 425.7±3.23µs -0.30%
traverse 50.7±2.49ms 53.1±1.77ms +4.73%

@vaivaswatha vaivaswatha marked this pull request as ready for review May 3, 2024 10:45
@vaivaswatha vaivaswatha requested a review from kayagokalp as a code owner May 3, 2024 10:45
@vaivaswatha vaivaswatha requested a review from a team May 4, 2024 05:06
Copy link

github-actions bot commented May 4, 2024

Benchmark for 2a52b52

Click to view benchmark
Test Base PR %
code_action 5.5±0.10ms 5.6±0.11ms +1.82%
code_lens 288.6±8.07ns 288.5±5.90ns -0.03%
compile 6.4±0.03s 6.2±0.06s -3.13%
completion 4.9±0.03ms 5.3±0.26ms +8.16%
did_change_with_caching 6.2±0.13s 6.3±0.11s +1.61%
document_symbol 988.5±44.19µs 1057.4±24.41µs +6.97%
format 88.3±1.30ms 87.0±1.59ms -1.47%
goto_definition 362.1±6.28µs 366.2±7.47µs +1.13%
highlight 9.0±0.15ms 9.1±0.21ms +1.11%
hover 607.5±44.34µs 606.1±13.47µs -0.23%
idents_at_position 123.0±0.31µs 122.1±0.43µs -0.73%
inlay_hints 670.8±22.57µs 660.9±17.65µs -1.48%
on_enter 493.5±8.38ns 474.8±14.75ns -3.79%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 366.7±7.45µs 367.3±5.66µs +0.16%
rename 9.7±0.21ms 9.7±0.19ms 0.00%
semantic_tokens 1041.1±10.52µs 1034.3±17.48µs -0.65%
token_at_position 354.9±3.07µs 359.8±2.74µs +1.38%
tokens_at_position 3.7±0.05ms 3.7±0.04ms 0.00%
tokens_for_file 417.8±2.42µs 446.1±4.57µs +6.77%
traverse 51.1±2.13ms 50.6±1.59ms -0.98%

@IGI-111 IGI-111 requested a review from a team May 6, 2024 02:21
Copy link

github-actions bot commented May 6, 2024

Benchmark for 46004ba

Click to view benchmark
Test Base PR %
code_action 5.7±0.17ms 5.5±0.20ms -3.51%
code_lens 333.7±15.88ns 294.9±22.17ns -11.63%
compile 6.6±0.11s 6.5±0.10s -1.52%
completion 5.2±0.25ms 5.2±0.27ms 0.00%
did_change_with_caching 6.6±0.08s 6.6±0.13s 0.00%
document_symbol 1070.6±59.42µs 936.2±9.57µs -12.55%
format 92.5±1.63ms 89.1±1.20ms -3.68%
goto_definition 369.1±6.40µs 362.6±6.34µs -1.76%
highlight 9.1±0.22ms 8.9±0.24ms -2.20%
hover 619.7±11.13µs 602.5±14.32µs -2.78%
idents_at_position 124.5±0.63µs 123.6±0.79µs -0.72%
inlay_hints 670.4±31.20µs 663.1±19.09µs -1.09%
on_enter 497.9±4.78ns 528.0±14.92ns +6.05%
parent_decl_at_position 3.9±0.08ms 3.7±0.06ms -5.13%
prepare_rename 371.2±8.79µs 367.6±17.78µs -0.97%
rename 9.9±0.21ms 9.4±0.22ms -5.05%
semantic_tokens 1059.0±15.50µs 1033.9±7.44µs -2.37%
token_at_position 373.2±4.44µs 357.8±5.10µs -4.13%
tokens_at_position 3.9±0.17ms 3.6±0.06ms -7.69%
tokens_for_file 429.9±2.38µs 437.7±3.84µs +1.81%
traverse 52.2±1.05ms 52.7±2.86ms +0.96%

@vaivaswatha vaivaswatha enabled auto-merge (squash) May 6, 2024 03:55
@vaivaswatha vaivaswatha merged commit 20b8ff0 into master May 6, 2024
33 checks passed
@vaivaswatha vaivaswatha deleted the vaivaswatha/bytecode_gen_fixes branch May 6, 2024 04:20
Copy link

github-actions bot commented May 6, 2024

Benchmark for 53a2962

Click to view benchmark
Test Base PR %
code_action 5.3±0.09ms 5.4±0.13ms +1.89%
code_lens 331.4±10.01ns 299.9±9.44ns -9.51%
compile 6.6±0.04s 6.7±0.09s +1.52%
completion 4.8±0.02ms 4.8±0.03ms 0.00%
did_change_with_caching 6.2±0.05s 6.3±0.15s +1.61%
document_symbol 1020.1±20.19µs 1025.5±23.01µs +0.53%
format 87.5±1.09ms 87.5±1.50ms 0.00%
goto_definition 344.6±7.47µs 353.7±18.62µs +2.64%
highlight 8.8±0.41ms 8.7±0.11ms -1.14%
hover 579.0±8.54µs 587.2±9.77µs +1.42%
idents_at_position 120.8±0.40µs 120.2±0.50µs -0.50%
inlay_hints 639.7±32.54µs 645.1±31.04µs +0.84%
on_enter 476.8±12.06ns 482.2±28.26ns +1.13%
parent_decl_at_position 3.6±0.05ms 3.6±0.04ms 0.00%
prepare_rename 352.7±5.28µs 351.7±8.26µs -0.28%
rename 9.2±0.36ms 9.2±0.35ms 0.00%
semantic_tokens 1024.6±7.95µs 1043.4±14.37µs +1.83%
token_at_position 336.8±2.25µs 343.2±3.60µs +1.90%
tokens_at_position 3.6±0.04ms 3.6±0.02ms 0.00%
tokens_for_file 416.0±1.88µs 414.3±2.93µs -0.41%
traverse 51.0±1.58ms 50.6±1.86ms -0.78%

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.

Functions return random bytes during External execution
3 participants