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

Fix decode for u16/u32 #5719

Merged
merged 4 commits into from Mar 11, 2024
Merged

Fix decode for u16/u32 #5719

merged 4 commits into from Mar 11, 2024

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Mar 11, 2024

Description

This PR fixes a problem when decoding u16 and u32.

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.

@xunilrj xunilrj self-assigned this Mar 11, 2024
@xunilrj xunilrj requested a review from a team March 11, 2024 10:36
Copy link

Benchmark for 3ecc242

Click to view benchmark
Test Base PR %
code_action 5.4±0.12ms 5.4±0.08ms 0.00%
code_lens 335.1±10.20ns 294.5±8.12ns -12.12%
compile 6.3±0.06s 6.2±0.16s -1.59%
completion 4.9±0.03ms 4.9±0.07ms 0.00%
did_change_with_caching 5.7±0.11s 5.8±0.12s +1.75%
document_symbol 1000.7±43.23µs 942.8±18.36µs -5.79%
format 72.3±0.94ms 73.5±1.31ms +1.66%
goto_definition 360.6±5.70µs 371.6±23.48µs +3.05%
highlight 9.0±0.14ms 9.1±0.22ms +1.11%
hover 590.8±10.06µs 603.3±19.41µs +2.12%
idents_at_position 121.5±0.33µs 123.0±0.80µs +1.23%
inlay_hints 664.5±15.76µs 683.6±31.20µs +2.87%
on_enter 489.1±6.73ns 487.5±26.57ns -0.33%
parent_decl_at_position 3.7±0.03ms 3.7±0.03ms 0.00%
prepare_rename 391.3±4.11µs 365.0±10.45µs -6.72%
rename 9.7±0.19ms 9.6±0.21ms -1.03%
semantic_tokens 1061.7±24.43µs 1049.1±37.19µs -1.19%
token_at_position 355.5±2.72µs 365.4±3.39µs +2.78%
tokens_at_position 3.7±0.02ms 3.7±0.04ms 0.00%
tokens_for_file 412.3±6.50µs 418.7±3.02µs +1.55%
traverse 47.4±2.07ms 44.9±1.50ms -5.27%

@IGI-111 IGI-111 requested a review from a team March 11, 2024 13:27
@xunilrj xunilrj force-pushed the xunilrj/fix-decode-for-u16-u32 branch from e18c210 to 66dc5a4 Compare March 11, 2024 15:38
Copy link

Benchmark for 7ea6394

Click to view benchmark
Test Base PR %
code_action 5.4±0.03ms 5.4±0.12ms 0.00%
code_lens 289.6±7.90ns 290.4±8.96ns +0.28%
compile 6.0±0.13s 6.2±0.08s +3.33%
completion 4.9±0.11ms 5.1±0.09ms +4.08%
did_change_with_caching 5.6±0.05s 5.7±0.08s +1.79%
document_symbol 1089.6±35.05µs 966.7±16.58µs -11.28%
format 70.3±0.64ms 70.1±0.47ms -0.28%
goto_definition 376.3±14.92µs 373.5±6.96µs -0.74%
highlight 9.1±0.03ms 9.2±0.15ms +1.10%
hover 608.4±23.26µs 604.9±11.28µs -0.58%
idents_at_position 122.6±0.61µs 121.9±1.04µs -0.57%
inlay_hints 666.2±7.26µs 673.0±8.82µs +1.02%
on_enter 493.8±7.92ns 494.9±14.17ns +0.22%
parent_decl_at_position 3.8±0.02ms 3.8±0.02ms 0.00%
prepare_rename 378.7±7.01µs 374.0±8.82µs -1.24%
rename 9.6±0.16ms 9.6±0.08ms 0.00%
semantic_tokens 1053.1±25.29µs 1052.4±15.97µs -0.07%
token_at_position 371.5±3.64µs 367.7±2.26µs -1.02%
tokens_at_position 3.7±0.03ms 3.8±0.13ms +2.70%
tokens_for_file 432.9±29.92µs 422.8±3.41µs -2.33%
traverse 43.8±1.04ms 45.1±2.67ms +2.97%

Copy link

Benchmark for 0b0a3e6

Click to view benchmark
Test Base PR %
code_action 5.4±0.04ms 5.4±0.11ms 0.00%
code_lens 289.6±7.59ns 292.7±6.99ns +1.07%
compile 6.0±0.07s 6.1±0.11s +1.67%
completion 4.9±0.02ms 5.0±0.12ms +2.04%
did_change_with_caching 5.5±0.11s 5.6±0.05s +1.82%
document_symbol 1043.5±35.19µs 952.5±30.47µs -8.72%
format 71.0±2.17ms 74.6±1.28ms +5.07%
goto_definition 372.5±28.89µs 360.5±5.77µs -3.22%
highlight 9.1±0.02ms 9.2±0.59ms +1.10%
hover 595.9±16.15µs 647.4±20.70µs +8.64%
idents_at_position 122.3±0.21µs 123.7±2.74µs +1.14%
inlay_hints 661.5±19.57µs 674.1±23.24µs +1.90%
on_enter 474.2±17.04ns 473.6±18.51ns -0.13%
parent_decl_at_position 3.8±0.03ms 3.7±0.05ms -2.63%
prepare_rename 367.7±12.63µs 367.3±7.79µs -0.11%
rename 9.6±0.24ms 9.6±0.03ms 0.00%
semantic_tokens 1040.0±15.93µs 1040.3±15.53µs +0.03%
token_at_position 360.7±3.01µs 363.1±2.23µs +0.67%
tokens_at_position 3.8±0.06ms 3.7±0.05ms -2.63%
tokens_for_file 421.3±4.21µs 430.9±3.23µs +2.28%
traverse 43.6±1.47ms 43.7±1.56ms +0.23%

@xunilrj xunilrj force-pushed the xunilrj/fix-decode-for-u16-u32 branch from 6f75e44 to ab57faa Compare March 11, 2024 17:38
Copy link

Benchmark for e60d6aa

Click to view benchmark
Test Base PR %
code_action 6.2±0.28ms 5.5±0.22ms -11.29%
code_lens 290.0±8.44ns 290.6±13.61ns +0.21%
compile 6.3±0.15s 6.3±0.13s 0.00%
completion 5.1±0.25ms 5.6±0.64ms +9.80%
did_change_with_caching 5.7±0.07s 6.3±0.20s +10.53%
document_symbol 1035.9±32.33µs 961.9±26.09µs -7.14%
format 72.9±1.30ms 70.4±1.68ms -3.43%
goto_definition 373.2±11.77µs 358.5±6.81µs -3.94%
highlight 9.2±0.20ms 9.1±0.18ms -1.09%
hover 599.6±20.27µs 675.4±18.90µs +12.64%
idents_at_position 123.6±0.52µs 123.9±1.46µs +0.24%
inlay_hints 679.1±17.12µs 666.5±20.11µs -1.86%
on_enter 474.6±13.73ns 472.0±13.37ns -0.55%
parent_decl_at_position 3.8±0.04ms 3.8±0.07ms 0.00%
prepare_rename 375.4±10.37µs 354.7±7.12µs -5.51%
rename 9.9±0.23ms 9.7±0.19ms -2.02%
semantic_tokens 1066.8±17.46µs 1049.1±23.95µs -1.66%
token_at_position 365.1±4.77µs 356.9±5.03µs -2.25%
tokens_at_position 3.8±0.14ms 3.9±0.19ms +2.63%
tokens_for_file 422.3±6.26µs 416.1±3.27µs -1.47%
traverse 46.0±1.75ms 47.0±2.30ms +2.17%

@xunilrj xunilrj enabled auto-merge (squash) March 11, 2024 18:36
Copy link

Benchmark for f42c52a

Click to view benchmark
Test Base PR %
code_action 5.4±0.03ms 5.5±0.07ms +1.85%
code_lens 289.7±7.57ns 287.6±8.41ns -0.72%
compile 6.0±0.07s 6.4±0.08s +6.67%
completion 5.0±0.20ms 5.2±0.19ms +4.00%
did_change_with_caching 5.5±0.05s 5.7±0.04s +3.64%
document_symbol 999.6±41.78µs 965.2±19.68µs -3.44%
format 69.3±0.75ms 70.1±1.30ms +1.15%
goto_definition 369.1±7.45µs 368.5±6.95µs -0.16%
highlight 9.1±0.18ms 9.2±0.15ms +1.10%
hover 604.8±19.96µs 689.6±20.44µs +14.02%
idents_at_position 122.2±0.36µs 122.4±1.31µs +0.16%
inlay_hints 668.9±10.43µs 671.9±9.77µs +0.45%
on_enter 467.7±18.48ns 467.0±17.53ns -0.15%
parent_decl_at_position 3.7±0.03ms 3.8±0.06ms +2.70%
prepare_rename 369.9±9.66µs 365.8±9.46µs -1.11%
rename 9.5±0.15ms 9.7±0.11ms +2.11%
semantic_tokens 1062.3±39.63µs 1067.0±58.29µs +0.44%
token_at_position 363.4±2.10µs 363.7±2.49µs +0.08%
tokens_at_position 3.7±0.07ms 3.7±0.05ms 0.00%
tokens_for_file 421.3±2.21µs 417.2±3.24µs -0.97%
traverse 44.4±1.82ms 45.9±1.78ms +3.38%

@xunilrj xunilrj merged commit 92c90d0 into master Mar 11, 2024
33 checks passed
@xunilrj xunilrj deleted the xunilrj/fix-decode-for-u16-u32 branch March 11, 2024 22:10
@hal3e hal3e restored the xunilrj/fix-decode-for-u16-u32 branch March 12, 2024 09:47
@hal3e hal3e deleted the xunilrj/fix-decode-for-u16-u32 branch March 14, 2024 08:34
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.

None yet

3 participants