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

Improves debug build times. #5861

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Improves debug build times. #5861

merged 2 commits into from
Apr 16, 2024

Conversation

esdrubal
Copy link
Contributor

@esdrubal esdrubal commented Apr 15, 2024

Description

Adds DCE before running other optimizations on the backend.

Running DCE before other optimizations reduces compile time in compolabs project from over 40 minutes to 76 seconds.

Fixes #5769

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.

Adds DCE before running other optimizations on the backend.

Running DCE before other optimizations reduces compile time in compolabs
project from over 40 minutes to 76 seconds.

Fixes #5769
@esdrubal esdrubal self-assigned this Apr 15, 2024
@esdrubal esdrubal added performance Everything related to performance, speed wise or memory wise. compiler: ir IRgen and sway-ir including optimization passes labels Apr 15, 2024
Copy link

Benchmark for 7438cf4

Click to view benchmark
Test Base PR %
code_action 5.3±0.15ms 5.3±0.09ms 0.00%
code_lens 292.0±4.22ns 294.9±5.50ns +0.99%
compile 6.1±0.03s 6.0±0.06s -1.64%
completion 4.8±0.01ms 4.8±0.08ms 0.00%
did_change_with_caching 6.0±0.07s 6.0±0.09s 0.00%
document_symbol 1005.5±40.44µs 957.0±25.39µs -4.82%
format 75.8±1.06ms 75.2±0.76ms -0.79%
goto_definition 371.0±10.08µs 364.3±11.92µs -1.81%
highlight 8.8±0.17ms 8.8±0.17ms 0.00%
hover 602.4±8.25µs 604.0±19.74µs +0.27%
idents_at_position 128.1±0.21µs 122.1±0.76µs -4.68%
inlay_hints 667.1±24.10µs 658.0±12.96µs -1.36%
on_enter 491.9±13.26ns 491.5±11.91ns -0.08%
parent_decl_at_position 3.6±0.06ms 3.6±0.05ms 0.00%
prepare_rename 367.9±4.76µs 361.0±3.67µs -1.88%
rename 9.3±0.17ms 9.3±0.20ms 0.00%
semantic_tokens 1076.7±17.55µs 1039.2±14.75µs -3.48%
token_at_position 365.5±2.09µs 362.0±2.49µs -0.96%
tokens_at_position 3.6±0.03ms 3.6±0.03ms 0.00%
tokens_for_file 414.1±2.86µs 411.0±1.50µs -0.75%
traverse 48.8±1.53ms 48.9±1.44ms +0.20%

@esdrubal esdrubal requested a review from a team April 16, 2024 09:12
@esdrubal esdrubal marked this pull request as ready for review April 16, 2024 09:12
@IGI-111 IGI-111 requested a review from a team April 16, 2024 09:14
Copy link

Benchmark for b73d540

Click to view benchmark
Test Base PR %
code_action 5.5±0.21ms 5.5±0.21ms 0.00%
code_lens 290.8±5.31ns 293.8±10.72ns +1.03%
compile 6.4±0.09s 6.5±0.07s +1.56%
completion 5.0±0.19ms 5.1±0.37ms +2.00%
did_change_with_caching 6.4±0.07s 6.4±0.09s 0.00%
document_symbol 1028.2±33.41µs 971.1±19.64µs -5.55%
format 77.3±1.26ms 75.7±1.42ms -2.07%
goto_definition 378.5±10.91µs 371.9±5.20µs -1.74%
highlight 9.0±0.30ms 8.9±0.25ms -1.11%
hover 616.7±8.55µs 614.3±11.32µs -0.39%
idents_at_position 122.5±0.61µs 122.7±2.70µs +0.16%
inlay_hints 666.7±33.62µs 666.3±28.65µs -0.06%
on_enter 478.1±5.01ns 489.6±24.90ns +2.41%
parent_decl_at_position 3.7±0.07ms 3.6±0.06ms -2.70%
prepare_rename 367.7±5.06µs 370.9±5.84µs +0.87%
rename 9.5±0.23ms 9.6±0.38ms +1.05%
semantic_tokens 1062.1±114.23µs 1075.6±14.99µs +1.27%
token_at_position 369.9±4.07µs 366.7±4.31µs -0.87%
tokens_at_position 3.6±0.08ms 3.7±0.10ms +2.78%
tokens_for_file 410.0±3.05µs 417.5±7.05µs +1.83%
traverse 50.9±0.99ms 52.1±1.05ms +2.36%

@IGI-111 IGI-111 merged commit fc572d5 into master Apr 16, 2024
36 checks passed
@IGI-111 IGI-111 deleted the esdrubal/fix_debug_build_time branch April 16, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: ir IRgen and sway-ir including optimization passes performance Everything related to performance, speed wise or memory wise.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Excessive Build Time with Forc 0.51.1 Compiler
3 participants