Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Performance History

Latest Results

Bump to 0.72.1 (#7728) ## Description This PR bumps the repo version to v0.72.1. ## 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). - [ ] 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
2 hours ago
Freeze data section layout during `AllocatedProgram` compilation (#7727) ## Description This PR fixes a critical issue of potential miscompilation coming from mutating the data section layout during `AllocatedProgram` compilation. The compiler panic described in #7724 was a "lucky" manifestation of this issue, the one that made compiler panic instead of generating miscompiled code. There were three places where instruction sizes were computed against a data section that was still mutating, and they were disagreeing with each other: 1. `map_label_offsets` computed label offsets using `instruction_size_not_far_jump`, which sized `AddrDataId` by testing `data_id_to_offset(id) <= TWELVE_BITS` against the data section as it was at that moment. 1. `lower_to_realized_ops` then use those label offsets for jump deltas, while `compile_jump/compile_call_inner` inserted far jump target words into non-configurables. 1. `to_bytecode_mut` finally computed `offset_to_data_section` and then appended load pointers while re-measuring (this was the immediate cause of #7724). This PR fixes the above issues by using the existing pattern already used for far jumps. It uses the same two-phase "pessimistic freeze, then realize" pattern applied to `AddrDataId` and to data section pointer insertion. The data section layout is frozen before any jumps are calculated. In order to freeze the layout we calculate the maximum (pesimistic) number of additional data section pointers that could be inserted between the non-configurables and configurables, effectively fixing the positions of the configurables and thus the decision on the number of instructions needed to address them (1: `ADDI` only, or 2: `MOVI` + `ADD`) before jumps are calculated. The pessimistic freeze in practice has none or very minimal performance impact. E.g., contracts used in Sway tests remained byte-identical, o2 `trade-account` contract remained byte-identical, and the `order-book` contract grown from 116,680 B to 116,696 B, where the additional 16 bytes represent two reserved but unused slots for pointers in the data section, while the code section remained byte-identical. The PR also makes the `FinalizedAsm` truly final. Previously, the `to_bytecode_mut` step was further mutating the "finalized" ASM, causing the discrepancy between the ASM and the data sections printed by `--asm final` and the `--bytecode`. `to_bytecode_mut` is renamed to `to_bytecode` and is now a purely serialization step. Work on this PR showed again that having a better display of the data section entries would be very beneficial. This will be done in a follow up PR. Additionally, the PR fixes the issue of the `Entry::equiv` method missing `Datum::Slice` when determining `Entry` equivalence. This removed the deduplication of slices in the data section which is usually not noticeable because `str` literals are during compilation stored as globals which also have their own deduplication. Still, in tests that were testing `panic` expression some slices were duplicated only in tests. These duplications are now properly removed. The large number of changed lines of code in this PR are due to tests that needed to deterministically force far jumps. This is achieved by generating extremely large `asm` blocks which contributed to large number of lines of code in those tests. - Fixes #7724. ## 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) - [x] 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
7 hours ago
Freeze data section layout during `AllocatedProgram` compilation
ironcev/fix-configurables-data-section-offset-issue
9 hours ago
update tests
xunilrj/improve-constant-propagate
2 days ago
update tests
xunilrj/improve-constant-propagate
2 days ago
Remove obsolete `CFEI`/`CFSI` optimization from ASM generation (#7721) ## Description This PR: - removes the special handling of `CFEI`/`CFSI` instructions from the `asm_lang` and `asm_generation`. That special handling was introduced in #5588 as an implementation of removal of `CFEI/CFSI` pairs if the allocated size was zero. Later on, #6627 implemented a general `CFE(I)/CFS(I)` removal as a localized optimization of the allocated abstract instruction set, but it did not removed the special handling introduced by #5588. - removes emitting of a `CFEI` for allocating globals, if the ASM does not have any globals. ## 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
2 days ago
Remove obsolete `CFEI`/`CFSI` optimization from ASM generation
ironcev/remove-misplaced-cfei-cfsi-optimization
2 days ago
update tests
xunilrj/decrease-back-jmps
3 days ago

Latest Branches

CodSpeed Performance Gauge
0%
Freeze data section layout during `AllocatedProgram` compilation#7727
3 days ago
13c816b
ironcev/fix-configurables-data-section-offset-issue
CodSpeed Performance Gauge
0%
Improve constant propagate#7722
2 days ago
9d47e7c
xunilrj/improve-constant-propagate
CodSpeed Performance Gauge
0%
2 days ago
90e73d0
ironcev/remove-misplaced-cfei-cfsi-optimization
© 2026 CodSpeed Technology
Home Terms Privacy Docs