FuelLabs
sway
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Optimize encoding and decoding of `Vec<T>` when `T` is trivial (#7582) ## Description This PR optimizes the encoding and decoding of `std::vec::Vec::<T>` when `T` is a trivially encodable and decodable type. In that case, we don't have encode each element individually, but just encode the vector's length and mem-copy its content to the `Buffer`. ## 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) - [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. --------- Co-authored-by: xunilrj <xunilrj@hotmail.com>
master
1 day ago
fix IR test
ironcev/optimize-vec-encoding-decoding
1 day ago
update tests
ironcev/optimize-vec-encoding-decoding
1 day ago
fix reduced std lib
ironcev/optimize-vec-encoding-decoding
1 day ago
update tests
ironcev/optimize-vec-encoding-decoding
2 days ago
pr adjustments
ironcev/optimize-vec-encoding-decoding
2 days ago
pr adjustments
ironcev/optimize-vec-encoding-decoding
2 days ago
update tests
ironcev/optimize-vec-encoding-decoding
2 days ago
Latest Branches
CodSpeed Performance Gauge
+12%
Optimize encoding and decoding of `Vec<T>` when `T` is trivial
#7582
1 day ago
2a991ef
ironcev/optimize-vec-encoding-decoding
CodSpeed Performance Gauge
0%
Fix `Vec` with ZSTs
#7620
3 days ago
69ac773
xunilrj/fix-vec-zst
CodSpeed Performance Gauge
0%
Fix tuple codec helpers to avoid LSP stack overflows
#7611
15 days ago
567cc73
lsp-bug
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs