yurydelendik opened PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik updated PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik updated PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik requested fitzgen for a review on PR #1260.
fitzgen submitted PR Review.
fitzgen created PR Review Comment:
I wonder if we could make this a
u32
in practice? Do we ever have to process Wasm files larger than 4GiB?This would let us shave off half the overhead on 64-bit platforms.
fitzgen created PR Review Comment:
Rather than having our index be a
BTreeMap<WasmAddress, Box<[RangeIndex]>
, which implies a bunch of allocated boxed slices that are all relatively small and potentially contribute to internal and/or external memory fragmentation, we should be able to save some memory by doing:index_ranges: Vec<RangeIndex>, // A map from the wasm address to the range within `index_ranges` for the associated wasm address. index: BTreeMap<WasmAddress, std::ops::Range<usize>>,Also if we can get away with it, we could make it a
Range<u32>
for extra savings.To do this, rather than inserting
sorted_ranges
into theindex
here, we would do something like:let start = all_ranges.len(); let end = start + sorted_ranges.len(); index_ranges.extend(sorted_ranges); index.insert(position, start..end);
fitzgen created PR Review Comment:
And the same here?
fitzgen created PR Review Comment:
Should this be
(WasmAddress, RangeIndex)
?
fitzgen submitted PR Review.
yurydelendik updated PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik updated PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik updated PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik updated PR #1260 from refactor-addr-transform
to master
:
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
yurydelendik merged PR #1260.
Last updated: Dec 23 2024 at 12:05 UTC