oxc/crates/oxc_parser
overlookmotel 5a13714a18
perf(parser): faster lexing template strings (#2541)
Speed up lexing template strings.

This was the last use of `AutoCow` remaining in the lexer, and it's now removed.

Implementation is quite complex, to avoid repeatedly branching on whether an unescaped string is required or not (the way `AutoCow` did). I tried to simplify it down to a single function, but this hurt performance significantly.

Benchmarks do not show much movement, but I believe that's because there aren't many template strings in the benchmarks. Where there are template strings, I believe this speeds up lexing them significantly.
2024-02-29 13:28:30 +08:00
..
examples chore(parser): print both AST and errors in examples/parser 2024-02-26 23:20:46 +08:00
src perf(parser): faster lexing template strings (#2541) 2024-02-29 13:28:30 +08:00
Cargo.toml Publish crates v0.8.0 2024-02-26 19:01:51 +08:00