Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize data section parsing and storage (#1024)
* refactor the DataSegment type * rename method * refactor how data segments are parsed and stored Active data segments now store all their bytes into a common buffer to avoid having many small allocations. * avoid heap allocations for small passive data segments * Revert "avoid heap allocations for small passive data segments" This reverts commit 1ff9249. * use len instead of end per active data segment This leads to smaller indices which mades it possible to only store u32 instead of usize decreasing the size_of<DataSegment> by 8 bytes in total. Also applied rustfmt and added missing docs. * fix size_of test * fix doc link * add missing docs * add more missing docs * apply rustfmt * use Vec<u8> instead of Box<[u8]> for bytes * apply rustfmt
- Loading branch information
Showing
6 changed files
with
257 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.