wasm2map
wasm2map copied to clipboard
Use a stack-based vec type instead of String in building the VLQ encoded bits
Background
There is a tight loop within WASM::generate where mappings are built and VQL encoded, which currently uses String. However String is heap allocated, which means a ton of small allocations. Since there is a practical limit of how long the mappings usually are, we can use a stack-based vec type (arrayvec, tinyvec, smallvec or the like) to avoid these allocations completely.
Success
Expected at least 50% mapping speedup based on previous experiments with heap vs stack allocated vec types.