Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Performance History

Latest Results

Implement `type_check_finalize` for `DeclEngine` optimization (#7714) ## Description This PR is a prerequisite for upcoming compiler performance optimization: removals of expensive hashing and removals of duplicates from the `DeclEngine`. The PR: - returns `HasChanges` from `type_check_finalize`, enabling callers to decide what to do in case of changes happened or not. - replaces `decl_engine.replace` calls with conditional calls to `decl_engine.insert_modified`. This was the central point of the refactoring. Before removing duplicates from the `DeclEngine` we need to remove the `replace` method. Note that the intended usage of the `replace` method wasn't to replace some shared declaration. The usages were assuming that the replaced declaration is used only from a single usage point, although `DeclEngine` never provided that guarantee. Having `insert_modified` instead of `replace` removes the possibility of unwanted side effects. - fixes `type_check_finalized` implementation for `TyDecl`. The implementation was `type_check_finalize`ing a cloned `TyDecl` that got discarded without actually affecting the original. - fixes `type_check_finalized` implementations that were swallowing errors coming from internal `type_check_finalized` calls. All errors are now properly propagated. - implements two `todo!`s in `TyExpressionVariant::type_check_finalize` by properly returning `HasChanges::No`. ## Checklist - [ ] I have linked to any relevant issues. - [x] 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). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] 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. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
master
20 hours ago
Merge branch 'master' into ironcev/type-check-finalize-has-changes
ironcev/type-check-finalize-has-changes
22 hours ago
Split AST to ASM compilation phase to AST -> IR -> ASM (#7713) ## Description This PR splits the `compile_ast_to_asm` compilation phase into two distinctive phases: `compile_ast_to_ir` and `compile_ir_to_asm`. This gives us additional metrics and more insight into how much time each phase is taking. It also allows us to run `forc check` up to the ASM generation phase to collect compilation errors that occur only at the IR stage, if we want to do it. Currently, some checks like, e.g., purity are done at the IR generation stage and are, e.g., not available to LSP which uses `check`. If we decide to extend the `check` phase, this will be done in a separate PR. ## Checklist - [ ] I have linked to any relevant issues. - [x] 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). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] 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. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
master
1 day ago
Split AST to ASM compilation phase to AST -> IR -> ASM
ironcev/split-ast-to-asm-compilation-phase
1 day ago
remove pending println
xunilrj/inline-spill-prediction
1 day ago
fix typo
xunilrj/inline-spill-prediction
2 days ago
update tests
xunilrj/inline-spill-prediction
2 days ago

Latest Branches

CodSpeed Performance Gauge
-21%
Implement `type_check_finalize` for `DeclEngine` optimization#7714
22 hours ago
f0c7b90
ironcev/type-check-finalize-has-changes
CodSpeed Performance Gauge
0%
2 days ago
81bae38
ironcev/split-ast-to-asm-compilation-phase
CodSpeed Performance Gauge
0%
Improve `inline` heuristic to avoid the final inlined function to be too big#7710
1 day ago
3fb2358
xunilrj/inline-spill-prediction
© 2026 CodSpeed Technology
Home Terms Privacy Docs