julia
ceca355e - staticdata: Encode relocation positions as bitmaps (#64064)

Commit
10 hours ago
staticdata: Encode relocation positions as bitmaps (#64064) Restoring an image walks the position of every object header and pointer field, stored as delta-varint lists. Pointer fields are 52% of all words of the sysimage data and headers 11%, so one bit per pointer-sized word is far denser than one byte per entry. Replace both lists with a bitmap each, applied in a single blockwise pass over the image, with image-local DataRef targets resolved inline. The sparse memowner and memref lists (under 1% of words) stay varints. `JI_FORMAT_VERSION` is bumped, since a sysimage is not tied to a Julia commit and one in the old format would otherwise be misread. sys.so shrinks from 176.7 to 171.9 MB and Pkg's heap image from 42.8 to 41.6 MB. Startup (`julia -e nothing`) on x86-64 executes 184M instead of 369M instructions and takes 57.2 instead of 61.5 ms; on a SiFive U74 it drops from 0.639 to 0.600 s. rv64gc has no ctz instruction and GCC lowers `__builtin_ctzll` to a libgcc call per set bit, so the lowest-bit lookup uses a de Bruijn multiply there.
Author
Parents
Loading