oxc/crates/oxc_parser
overlookmotel 48e20880d4
perf(ast): box enum variants (#3058)
Box all enum variants for JSX types (`JSXAttributeName`,
`JSXAttributeValue`, `JSXChild`, `JSXElementName`,
`JSXMemberExpressionObject`). Part of #3047.

I'm not sure how to interpret the benchmark results. As I said on #3047:

> I imagine it may cost a little in performance in the parser due to
extra calls to `alloc`, but in return traversing the AST should be
cheaper, as the data is more compact, so less cache misses.

Sure enough, there is a small impact (1%) on the 2 parser benchmarks for
JSX files. However, the other benchmarks have too much noise in them to
see whether this is repaid in a speed up on transformer etc, especially
as the transformer benchmarks also include parsing.

What do you think @Boshen?
2024-04-22 09:09:30 +08:00
..
examples Make ast types covariant over the allocator lifetime. (#2943) 2024-04-12 18:12:18 +08:00
src perf(ast): box enum variants (#3058) 2024-04-22 09:09:30 +08:00
Cargo.toml Release crates v0.12.4 2024-04-19 16:40:05 +08:00
CHANGELOG.md Release crates v0.12.3 2024-04-11 16:18:17 +08:00