oxc-project
oxc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
[autofix.ci] apply automated fixes
costajohnt:feat/minify-ternary-numeric
17 minutes ago
refactor(ast_tools): simplify struct field reordering (#20587) Follow-on after #20584. Simplify implementation of struct field ordering in `ast_tools`. This change does not alter any layouts, just shortens the code by taking a simpler approach to handling ZST fields.
main
6 hours ago
perf(ast): mark `AstKind::address` as `#[inline]` (#20586) Similar to #20585. As `AstKind`'s variants are all structs (no enums any more), and all structs have an `AstKind`, `AstKind::address` method boils down to a no-op. So mark it `#[inline]`. Also remove some defunct code from `AstKind` codegen which was handling when an `AstKind` refers to an enum. This circumstance is no longer possible, so remove this code.
main
6 hours ago
perf(ast): mark `AstKind::span` as `#[inline]` (#20585) Now that `AstKind`'s variants are all structs (no enums any more), and #20584 has ensured that `Span` is in a consistent position in all structs, `AstKind::span` should boil down to a single operation - a pointer read. Therefore, mark it `#[inline]`. Note: `Span` was already in a consistent position prior to #20584, but that was more by accident than anything else. Now it's guaranteed. But this change won't make a difference to perf, it just guards against a perf regression in future.
main
6 hours ago
perf(ast): place `NodeId` field after `Span` in structs (#20584) Alter the code in `ast_tools` which re-orders struct fields, to make `NodeId` always occupy a consistent "slot" in every AST node - at byte position 8, just after `Span`. This will be a sizeable gain once we start utilizing the `NodeId` fields more. Because, for example, every variant of `Expression` has its `NodeId` stored in same location as all the other variants, `Expression::node_id()` is just 1 operation - a pointer read - rather than a nest of branches, or a lookup table. Also alter the algorithm for ordering struct fields to fill in the 4-byte gap after `NodeId` field with other field(s), to avoid excess padding. The new algorithm also prioritizes keeping fields in definition order as much as possible, rather than sorting them strictly in order of size and alignment. This is mildly advantageous because field definition order is the order the AST is walked in, so it avoids bouncing between cache lines while iterating through the fields of a struct when visiting the AST. No types change size in the process. Fields remain packed to keep type sizes the minimum they can be - they just change order.
main
6 hours ago
refactor(ast): re-order layout assertions in memory order (#20583) Refactor. Generate assertions for type sizes in the order which they are in memory. This makes it easier to see how these types are laid out in memory.
main
6 hours ago
refactor(ast_tools): search all crates which depend on `oxc_ast_macros` (#20577) One annoyance with `ast_tools`, our codegen, has been that when you want it to generate code from types in some file, you had to manually add the file paths to a list in `ast_tools` itself. This PR removes that list and instead finds crates in the monorepo which depend on `oxc_ast_macros` crate, via `cargo metadata`, and searches all files in those crates for types with `#[ast]` attributes etc - types that it need to act on. There is no longer a list to keep updated, you just mark types `#[ast]` and the codegen will find them. This produces some churn in generated files. None of the generated code changes, it just gets re-ordered in some places, due to the different order that files get found in now. This order is deterministic, and it should not change again.
main
6 hours ago
perf(ast): place `NodeId` field after `Span` in structs
om/02-15-perf_ast_place_nodeid_field_after_span_in_structs
7 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
feat(minifier): minify `x ? 1 : 0` to `+x` or `+!!x`
#20594
19 minutes ago
cd6aacf
costajohnt:feat/minify-ternary-numeric
CodSpeed Performance Gauge
0%
perf(ast): place `NodeId` field after `Span` in structs
#20584
1 month ago
2064ade
om/02-15-perf_ast_place_nodeid_field_after_span_in_structs
CodSpeed Performance Gauge
0%
refactor(ast_tools): simplify struct field reordering
#20587
1 month ago
3a94ef2
om/02-15-refactor_ast_tools_simplify_struct_field_reordering
Ā© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs