oxc/crates/oxc_sourcemap
overlookmotel c7f1d48c0e perf(sourcemap): keep local copy of previous token in VLQ encode (#4596)
In source map VLQ encoding, keep local copy of previous `Token`, rather than looking up up from `tokens`.

On a local benchmark of just VLQ encoding, this change produces 6% performance increase (benchmarked on MacBook Pro M1).
2024-08-01 14:58:08 +00:00
..
src perf(sourcemap): keep local copy of previous token in VLQ encode (#4596) 2024-08-01 14:58:08 +00:00
Cargo.toml Release crates v0.23.0 (#4595) 2024-08-01 16:55:41 +08:00
CHANGELOG.md Release crates v0.23.0 (#4595) 2024-08-01 16:55:41 +08:00
README.md

The sourcemap implement port from rust-sourcemap, but has some different with it.

  • Encode sourcemap at parallel, including quote sourceContent and encode token to vlq mappings.
  • Avoid Sourcemap some methods overhead, like SourceMap::tokens().