Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Performance History

Latest Results

update tests
xunilrj/opt-get-config
6 hours ago
Use `DeclEngine::insert_modified` instead of `with_parent` (#7744) ## Description This PR removes `with_parent` method from the `DeclEngine`. It is an another prerequisite for removals of duplicates from `DeclEngine` and for elimination of expensive hashing. Semantically valid registering of parents is now enforced implicitly inside of the `insert_modified` method. The previous API based on `with_parent` suffered from two conceptual issues: - The API was allowed for `TraitFn`, `Function`, `Constant`, and `Type`, but needed only for linking dummy functions to their trait/ABI interface declarations and for linking monomorphized functions to their original declarations. In other words, the parent links were never consumed for `Constant`s and associated `Type`s. Still, they were _sometimes_ added to declarations, only bloating the `DeclEngine`. - As mentioned in the above point, _sometimes_ added leads to the second API issue, the fact that `with_parent` was a separate call that could easily either be forgotten or called on a declaration for which it was irrelevant. The only two cases where we actually need parent links are: - every dummy function must be linked to its `TraitFn`, - every modified copy of a `TyFunctionDecl/TyTraitFn` must be linked to its original. The other two associated items, constants and associated types are redirected by entirely different mechanisms: - A `ConstantExpression` embeds the whole `TyConstantDecl` inline (not a DeclId reference). Redirection to the impl's constant happens in `UpdateConstantExpression` via `find_const_decl_from_impl`, which does a name-based lookup in the implementing impl block's items and overwrites the embedded decl in place. - Associated types references live as `TypeInfo::TraitType` in the `TypeEngine` and are substituted through `TypeSubstMap::find_match`. The new API enforces the preservation of only the two parent links listed above by design. Consequently, the `AssociatedItemDeclId` is renamed to `FunctionalDeclId`, to match the similar `InterfaceDeclId` grouping of `Abi` and `Trait` declarations. ## Checklist - [x] 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
6 hours ago
Add `DeclId<T>::substitute_types_and_insert_new_if_not_concrete`
ironcev/decl-engine-remove-with-parent
8 hours ago
Fix fmt issues
ironcev/decl-engine-remove-with-parent
7 days ago
update tests
xunilrj/opt-get-config
11 days ago
removing
xunilrj/opt-get-config
11 days ago
Improve fn order to decrease fn call cost (#7720) ## Description This PR try to optimise gas usage, by decreasing the cost of calls. Function calls get more expensive as the farther the target function is. So, we try to change the order of the "worst functions" and see if there is a spot where the approximated gas decreases. # Changes After f544254 - Far cost dropped from 6 to 4; - A caller-first DFS seed was added; - Multi-start SA from IR, DFS, and some pseudo-random orders; - Followed by a sum-only hill-climb; - Hard Pareto is no longer part of the search. ## Checklist - [x] 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). - [ ] 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. - [ ] 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. --------- Co-authored-by: Igor Rončević <ironcev@hotmail.com>
master
11 days ago

Latest Branches

CodSpeed Performance Gauge
0%
Optimise get_config for trivial types#7682
11 days ago
ebca105
xunilrj/opt-get-config
CodSpeed Performance Gauge
0%
Use `DeclEngine::insert_modified` instead of `with_parent`#7744
8 hours ago
1abcff0
ironcev/decl-engine-remove-with-parent
CodSpeed Performance Gauge
0%
7 days ago
8f7d79f
xunilrj/improve-constant-propagate
© 2026 CodSpeed Technology
Home Terms Privacy Docs