oxc/crates/oxc_sourcemap
Brooooooklyn 4d10c6c9be
perf(sourcemap): pre allocate String buf while encoding (#4476)
I'm trying llama3.1:70b following [local-ai-copilot](https://developer.ibm.com/tutorials/awb-local-ai-copilot-ibm-granite-code-ollama-continue/) to find some potential performance improvement.

The code was not completed by AI; it only identified potential optimizations, which I am testing for effectiveness.
2024-07-26 13:58:09 +00:00
..
src perf(sourcemap): pre allocate String buf while encoding (#4476) 2024-07-26 13:58:09 +00:00
Cargo.toml Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
CHANGELOG.md Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +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().