Commits
Click on a commit to change the comparison rangeperf(sourcemap): elide bounds checks in VLQ encoding (#4583)
In `oxc_sourcemap`'s VLQ encoding, avoid bounds checks when pushing bytes to the encoded string in the hot loop.
Those bounds checks are quite expensive as they involve a function call to `alloc::raw_vec::RawVec::grow_one`, and that happens on every single pushed byte.
https://godbolt.org/z/44G8jjss3
Not much difference on benchmarks, as VLQ encoding is only a small part of source map generation, but a local benchmark of just VLQ encoding shows this increases performance by 11%.1 year ago
by overlookmotel