alexcrichton opened PR #2324 from compress-again
to main
:
This commit reduces the size of
InstructionAddressMap
from 24 bytes to
8 bytes by dropping thecode_len
field and reducingcode_offset
to
u32
instead ofusize
. The intention is to primarily make the
in-memory version take up less space, and the hunch is that the
code_len
is largely not necessary since most entries in this map are
always adjacent to one another. Thecode_len
field is now implied by
thecode_offset
field of the next entry in the map.This isn't as big of an improvement to serialized module size as #2321
or #2322, primarily because of the switch to variable-length encoding.
Despite this though it shaves about 10MB off the encoded size of the
module from #2318
alexcrichton updated PR #2324 from compress-again
to main
:
This commit reduces the size of
InstructionAddressMap
from 24 bytes to
8 bytes by dropping thecode_len
field and reducingcode_offset
to
u32
instead ofusize
. The intention is to primarily make the
in-memory version take up less space, and the hunch is that the
code_len
is largely not necessary since most entries in this map are
always adjacent to one another. Thecode_len
field is now implied by
thecode_offset
field of the next entry in the map.This isn't as big of an improvement to serialized module size as #2321
or #2322, primarily because of the switch to variable-length encoding.
Despite this though it shaves about 10MB off the encoded size of the
module from #2318
peterhuene requested peterhuene for a review on PR #2324.
peterhuene submitted PR Review.
peterhuene created PR Review Comment:
Should this have a trailing default range starting at 26 so that the below assert (e.g.
assert_eq!(26, positions[0].gen_end);
) remains unchanged?
peterhuene submitted PR Review.
alexcrichton updated PR #2324 from compress-again
to main
:
This commit reduces the size of
InstructionAddressMap
from 24 bytes to
8 bytes by dropping thecode_len
field and reducingcode_offset
to
u32
instead ofusize
. The intention is to primarily make the
in-memory version take up less space, and the hunch is that the
code_len
is largely not necessary since most entries in this map are
always adjacent to one another. Thecode_len
field is now implied by
thecode_offset
field of the next entry in the map.This isn't as big of an improvement to serialized module size as #2321
or #2322, primarily because of the switch to variable-length encoding.
Despite this though it shaves about 10MB off the encoded size of the
module from #2318
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Makes sense to me!
alexcrichton merged PR #2324.
Last updated: Nov 22 2024 at 17:03 UTC