Skip to content

Instantly share code, notes, and snippets.

@Boshen

Boshen/perf.md Secret

Last active September 29, 2025 21:07
Show Gist options
  • Select an option

  • Save Boshen/7ee09b4cd22fcb8146b75f55c5ac5321 to your computer and use it in GitHub Desktop.

Select an option

Save Boshen/7ee09b4cd22fcb8146b75f55c5ac5321 to your computer and use it in GitHub Desktop.
Oxc perf wins

Performance Improvements

Summary

Top Contributors

  • Boshen (83)
  • overlookmotel (69)
  • Dunqing (39)
  • camc314 (18)
  • rzvxa (11)
  • camchenry (7)
  • mysteryven (7)
  • leaysgur (5)
  • underfin (5)
  • DonIsaac (4)
  • oxc-bot (4)
  • renovate (4)
  • IWANABETHATGUY (3)
  • Brooooooklyn (2)
  • dependabot (2)
  • jelly (2)
  • lucab (2)
  • re-taro (2)
  • 21 authors with 1 contribution

allocator

  • 08.41% #6623 make Vec non-drop (overlookmotel)
  • 05.27% #9656 replace allocator_ap2's Vec with Vec2 (Dunqing)
  • 03.68% #10353 fix quotes in comment (overlookmotel)
  • 03.03% #13128 remove Default impl for AllocatorPool (overlookmotel)

allocator/bitset

  • 31.74% #13450 store bits as usizes (overlookmotel)

allocator/vec

  • 14.32% #11081 access len and cap fields via getters/setters (overlookmotel)

ast

  • 14.33% #11162 remove dummy comment (overlookmotel)
  • 07.88% #11535 get jsx types out of AstKind exceptions (ulrichstark)
  • 06.19% #10234 remove write! macro where unnecessary (overlookmotel)
  • 05.57% #4045 store trivia comments in a sorted slice (lucab)
  • 05.45% #12022 remove AstKind for ModuleDeclaration (camchenry)
  • 05.24% #1509 document connection between TemplateLiteral's quasis & expression arrays (u9g)
  • 05.14% #2776 add walk_mut functions (rzvxa)
  • 05.04% #12108 remove AstKind for PropertyKey (camchenry)
  • 04.67% #7547 change 'raw' from &str to Option (ShuiRuTian)
  • 04.35% #4009 inline visit walks with small bodies. (rzvxa)
  • 03.64% #7821 span field must be the first element (Boshen)
  • 03.42% #11152 shorten CommentNewlines methods (overlookmotel)
  • 03.40% #8981 include directives in body (hi-ogawa)
  • 03.21% #7974 add AstBuilder::atom_from_cow (overlookmotel)

ast/estree

  • 24.22% #9256 replace serde with custom ESTree serializer (overlookmotel)
  • 15.20% #9396 reduce overhead serializing static strings (overlookmotel)
  • 06.56% #9398 skip escaping identifiers (overlookmotel)
  • 06.16% #9359 speed up building UTF8-UTF16 translation table with SIMD (overlookmotel)

ast_codegen, ast

  • 06.49% #4061 visit ExpressionArrayElement as Expression. (rzvxa)

benchmark

  • 14.71% #8573 make lexer benchmark more realistic (overlookmotel)
  • 11.67% #1811 use more complicated files (Boshen)

benchmarks

  • 00.00% #9388 exclude parser from isolated declarations benchmark timing (overlookmotel)

cfg

  • 06.21% #3728 move control flow to its own crate. (rzvxa)

ci

  • 05.36% #12409 fix napi release (Boshen)

codegen

  • 64.60% #985 move minifying printer to codegen crate (Boshen)
  • 44.41% #3514 wrong escape string (Dunqing)
  • 26.26% #2591 speed up building sourcemap line tables (overlookmotel)
  • 13.91% #7064 replace daachorse with string match for annotation comment (Boshen)
  • 11.73% #4055 preserve parentheses from AST instead calculating from operator precedence (Boshen)
  • 10.27% #2843 sourcemap token name should be original name (underfin)
  • 08.04% #12393 remove clone of source text in sourcemap builder (Boshen)
  • 06.20% #2583 correct sourcemaps when unicode chars (overlookmotel)
  • 06.19% #2584 correct sourcemaps when Windows line breaks + unicode (overlookmotel)
  • 05.30% #2597 speed up generating sourcemap mappings (overlookmotel)
  • 05.13% #13084 adjust some source mappings (Boshen)
  • 04.02% #4643 reduce size of LineOffsetTable (overlookmotel)
  • 03.76% #4374 print shorthand for all { x } variants (Boshen)
  • 03.35% #13180 remove end sourcemaps for }, ], ) (Boshen)

coverage

  • 06.11% #3552 use code without meta options in TypeScriptSuite (Dunqing)
  • 04.03% #3145 avoid an String::from_utf8 over head during serialization (Boshen)

crates

  • 14.82% #11504 v0.72.3 (oxc-bot)
  • 03.15% #9582 v0.56.1 (oxc-bot)

data_structures

  • 03.81% #13434 add SliceIterExt::peek method (overlookmotel)
  • 03.36% #7766 line breaks (overlookmotel)
  • 03.21% #7882 add line break (overlookmotel)

deps

  • 20.52% #3151 update dependency rust to v1.78.0 (renovate)
  • 06.56% #2913 lock file maintenance rust crates (renovate)
  • 06.16% #10136 update github-actions (renovate)
  • 05.90% #1716 bump the dependencies group with 4 updates (dependabot)
  • 05.25% #1558 bump the dependencies group with 9 updates (dependabot)
  • 05.18% #11931 update dependency rust to v1.88.0 (renovate)

formatter

  • 09.19% #11841 reduce memory allocation for DynamicText (Dunqing)
  • 07.70% #10379 remove source map (Boshen)
  • 03.31% #13741 add space after extends in TSInterfaceDeclaration (Sysix)

isolated-declarations

  • 33.80% #6078 should clone transformed AST rather than original AST (Dunqing)
  • 07.62% #3755 add ts error code to the error message (Dunqing)
  • 06.15% #3739 function overloads reaching unreachable (Dunqing)
  • 06.07% #3753 transform incorrectly when there are multiple functions with the same name (Dunqing)
  • 05.19% #3751 false positives for non-exported binding elements (Dunqing)
  • 00.00% #4074 use FxHashSet instead of Vec to speed up the contain (Dunqing)

isolated_declarations

  • 00.00% #9389 use aliases ArenaBox / ArenaVec (overlookmotel)
  • 00.00% #9390 rename var (overlookmotel)

lexer

  • 10.42% #3186 improve comment building performance by using a vec instead of btreemap (Boshen)
  • 08.47% #12521 only check for hashbang at start of file (overlookmotel)
  • 05.83% #3283 dedupe numeric separator check (DonIsaac)
  • 03.09% #13057 simplify byte handler macros (overlookmotel)

linter

  • 45.05% #13690 detect node types from let..else statements (camchenry)
  • 40.53% #2049 remove the --timings feature (Boshen)
  • 39.95% #1759 precompute rule.name() (Boshen)
  • 35.14% #6600 apply small file optimization, up to 30% faster (camchenry)
  • 19.91% #1257 prefer dom node dataset (camc314)
  • 19.24% #11139 add allow_regex_characters option to no-useless-escape (camc314)
  • 14.56% #1783 reduce the RuleEnum enum size from 168 to 16 bytes (Boshen)
  • 13.20% #2413 no-new-wrappers (alakhpc)
  • 12.15% #2703 eslint-plugin-jest: prefer-expect-resolves (eryue0220)
  • 10.95% #13736 add node type codegen support for match node.kind() (camchenry)
  • 09.75% #1932 feat(linter) eslint-plugin-next google-font-preconnect (camc314)
  • 08.67% #2789 @typescript-eslint/prefer-for-of (charnog)
  • 07.48% #1949 eslint-plugin-jsx-a11y role-support-aria-props (re-taro)
  • 07.27% #1202 detect assert function in Await Expression (mysteryven)
  • 07.11% #1966 support overriding oxlint rules by eslint config (Boshen)
  • 07.03% #1961 eslint-plugin-jsx-a11y role-support-aria-props (re-taro)
  • 06.88% #1964 Support cases where aria-hidden includes expressions (keita-hino)
  • 06.87% #1892 eslint-plugin-react: no-direct-mutation-state (zhangrunzhao)
  • 06.82% #2642 Implement jsdoc/check-access (leaysgur)
  • 06.37% #1145 feat(linter) parse configuration for unicorn/filename-case (camc314)
  • 06.10% #1919 disable no-unused-labels for svelte (Boshen)
  • 06.05% #848 downgrade category of expect-expect and no-alias-methods (mysteryven)
  • 05.56% #1176 no useless fallback (camc314)
  • 05.25% #1613 no array foreach (camc314)
  • 05.23% #1470 refactor(linter) Use is_method_call in no_console_spaces (camc314)
  • 05.22% #1688 Don't check for multiple bits at once. (AndyA)
  • 05.22% #1705 eslint-plugin-unicorn no-null(style) (Ken-HH24)
  • 05.20% #1700 chore(linter) convert catch error name to a warning (camc314)
  • 05.11% #1951 feat(linter) eslint-plugin-next no-img-element (camc314)
  • 04.93% #13138 skip rules that do not have any relevant node types (camchenry)
  • 04.48% #5584 add should_run to check path only once to nextjs/no_typos (Boshen)
  • 04.32% #4570 remove allocations for string comparisons (DonIsaac)
  • 04.18% #1150 prefer date now (camc314)
  • 04.08% #3761 LintContext can now only be constructed with a cfg enabled semantic. (rzvxa)
  • 03.41% #3391 remove unnecessary check in eslint/no-global-assign (mysteryven)
  • 03.23% #7680 update rule documentation (camc314)
  • 03.23% #7723 add regression tests for import/namespace (shulaoda)
  • 03.15% #7626 false positive in exhaustive-deps (camc314)
  • 03.08% #3393 no-new false positive when return from arrow expression (Boshen)
  • 03.06% #2739 eslint/max-lines (andipabst)

linter/eslint

  • 18.25% #3259 Implement fixer for unicode-bom rule (jelly)
  • 03.37% #3365 Implement prefer-exponentiation-operator (jelly)

linter/import

  • 05.26% #2691 check ObjectPattern syntax in namespace (Dunqing)
  • 03.68% #2720 feat(linter/import) implement no_unused_modules rule (Dunqing)

linter/jsx_key

  • 05.97% #1139 ignore ObjectProterty nodes (yesmeck)

linter/no-direct-mutation-state

  • 04.57% #3294 false positive when class is declared inside a CallExpression (Boshen)

lsp

  • 09.80% #1923 support vue, astro and svelte (IWANABETHATGUY)

manger

  • 04.05% #8741 Revert "perf(manger): remove useless tmp_bindings (#8735)" (Dunqing)

mangler

  • 16.74% #8471 allocate data in arena (Boshen)
  • 09.01% #8472 allocate base54 name without heap allocation (Boshen)
  • 07.39% #8495 use a single allocation space for temporary vecs (Boshen)
  • 06.82% #8724 optimize handling of collecting lived scope ids (Dunqing)
  • 06.46% #13462 store slot indexes as u32s (overlookmotel)
  • 05.79% #8557 optimize base54 function (overlookmotel)
  • 03.27% #11409 use bump allocator for internal storage (camchenry)

minfier

  • 13.97% #13000 single match expression (Boshen)

minifier

  • 74.64% #8184 fuse ast passes (Boshen)
  • 74.09% #4677 only visit arrow expression after dropping console.log (Boshen)
  • 63.25% #990 make the minifier api only accept an ast (Boshen)
  • 21.13% #8651 add LatePeepholeOptimizations (Boshen)
  • 18.10% #8411 remove the buggy ?? transform (Boshen)
  • 15.36% #13078 no need to collect references if AST is not changed (Boshen)
  • 15.26% #11786 add Treeshake options (Boshen)
  • 14.38% #8228 statement fusion switch cases; improved minimize exit poitns (Boshen)
  • 13.57% #8669 move conditional assignment to minimize_conditions (Boshen)
  • 13.09% #8770 port esbuild's mangleStmts (Boshen)
  • 11.35% #8668 remove "non esbuild optimizations" which is incorrect (Boshen)
  • 09.86% #8243 disable RemoveUnusedCode (Boshen)
  • 09.46% #8467 merge Normalize and RemoveSyntax pass (Boshen)
  • 08.04% #8327 clean up peephole_substitute_alternate_syntax (Boshen)
  • 07.39% #8059 only minify on ast node exit (Boshen)
  • 07.37% #8644 only run optimizations on local changes (Boshen)
  • 05.98% #12670 remove late optimization pass (Boshen)
  • 04.66% #5936 implement part of StatementFusion (Boshen)
  • 03.50% #8111 clean up peephole_substitute_alternate_syntax.rs (Boshen)
  • 03.50% #8661 use NonEmptyStack for function stack (Boshen)
  • 03.43% #9356 concatenate strings with template literals on right side (sapphi-red)
  • 03.31% #13938 add comprehensive documentation for oxc_minifier (Boshen)
  • 00.00% #6222 minifier benchmark measure only the minifier itself (overlookmotel)
  • 00.00% #7493 fuse ast passes (Boshen)
  • 00.00% #8349 remove the buggy minimize_exit_points implementation (Boshen)
  • 00.00% #8351 port esbuild conditional expr minification (camc314)

napi

  • 03.02% #3041 remove unnecessary custom Serialize impl for Atom (overlookmotel)

napi/parser

  • 04.45% #2957 remove experimental flexbuffer api (Boshen)

other

  • 21.42% #2865 remove oxc_transformer for a reimplementation (Boshen)
  • 17.79% #2465 miette v7 (Boshen)
  • 10.61% #967 Enable mangler (Boshen)
  • 09.58% #2517 replace InlinableString with CompactString for Atom (Boshen)
  • 07.52% #958 Rust 1.73.0 (Boshen)
  • 06.93% #3639 remove trailing whitespaces for all files; add .editorconfig (Boshen)
  • 06.58% #1853 upgrade rustc toolchain to stable 1.75.0 (IWANABETHATGUY)
  • 06.01% #2731 silence erroneous RA warnings for Tsify (overlookmotel)
  • 05.91% #2918 skip benchmark-napi because it is flaky (Boshen)
  • 05.25% #2497 [BREAKING CHANGE] Change Atom to Atom<'a> to make it safe (Boshen)
  • 05.19% #1703 add new-oxc-rule to rulegen (camc314)
  • 04.09% #2737 criterion2 (Boshen)
  • 03.28% #5316 Release oxlint v0.9.1 (oxc-bot)
  • 03.21% #1157 🤖 make FileSystem trait object safe (IWANABETHATGUY)
  • 03.09% #1152 split parse_jest_fn_call (mysteryven)
  • 00.00% #5193 transformer benchmark measure transformer itself only (overlookmotel)

oxc_semantic

  • 05.43% #2250 proper traversal of try statements (TzviPM)

oxlint

  • 03.27% #10287 v0.16.5 (oxc-bot)

parser

  • 56.76% #2352 lex identifiers as bytes not chars (overlookmotel)
  • 27.35% #2353 eat whitespace after line break (overlookmotel)
  • 11.85% #2357 lex strings as bytes (overlookmotel)
  • 09.41% #2288 lexer replace Chars with Source (overlookmotel)
  • 08.76% #1962 reduce Token size from 32 to 16 bytes (Boshen)
  • 08.03% #2558 lex JSXText with memchr (overlookmotel)
  • 07.90% #10588 remove -> Result<T> from all parsing methods (Boshen)
  • 06.35% #3349 improve parse_simple_arrow_function_expression (Boshen)
  • 04.83% #2366 optimize lexing strings (overlookmotel)
  • 04.70% #2834 add support for empty module declaration (rzvxa)
  • 04.25% #2687 improve lexing of jsx identifier to fix duplicated comments after jsx name (Boshen)
  • 03.96% #2374 consume single-line comments faster (overlookmotel)
  • 03.86% #2377 consume multi-line comments faster (overlookmotel)
  • 03.77% #3352 improve expression parsing (Boshen)
  • 03.58% #10363 Handle JSDocUnknownType correctly (leaysgur)
  • 03.55% #10616 improve perf of checking for licence/legal comments (camc314)
  • 03.39% #7963 include export token in spans of TSNamespaceExportDeclaration (branchseer)

parser,diagnostic

  • 11.24% #3214 one diagnostic struct to eliminate monomorphization of generic types (Boshen)

parser,linter

  • 33.04% #7554 use a different ModuleRecord for linter (Boshen)

prettier

  • 06.45% #1334 add more expression formatting logic (Boshen)
  • 05.26% #1324 refactor(prettier) Remove flat_contents from IfBreak (camc314)
  • 05.25% #1491 check commandjs or amd in CallExpression only (Dunqing)
  • 05.24% #1499 format number in member expression (Boshen)
  • 05.24% #1560 feat(prettier) use groupId in fluid assignments (camc314)
  • 03.98% #1370 wrap a group in BinaryExpression (Dunqing)
  • 03.95% #3026 simplify import (overlookmotel)

resolver

  • 22.29% #871 avoid double hashing by memoizing the hash (Boshen)
  • 05.45% #869 cache node_modules lookup (Boshen)

semantic

  • 30.52% #5876 use Comment::attached_to for jsdoc attachment (Boshen)
  • 30.11% #4328 calculate number of nodes, scopes, symbols, references before visiting AST (Dunqing)
  • 29.98% #4367 calculate number of nodes, scopes, symbols, references before visiting AST (Dunqing)
  • 18.42% #3122 connect test expression of for statements to the cfg. (rzvxa)
  • 17.64% #4264 reduce AstNodeId to u32 (overlookmotel)
  • 13.63% #2792 ModuleRecord's indirect_export_entires missing reexported imports (Dunqing)
  • 13.23% #3738 no longer generate CFG by default. (rzvxa)
  • 12.13% #4379 var hoisting (Dunqing)
  • 11.79% #2414 reduce allocation in resolve_references_for_current_scope (Dunqing)
  • 10.83% #5762 add SemanticBuilder::with_excess_capacity (overlookmotel)
  • 09.97% #3737 make control flow generation optional. (rzvxa)
  • 08.21% #5260 transform checker do not output spans in errors (overlookmotel)
  • 07.77% #3972 use Atom<'a> for References (DonIsaac)
  • 06.07% #4214 reduce lookups (overlookmotel)
  • 05.32% #2896 symbols inside functions and classes incorrectly flagged as exported (DonIsaac)
  • 05.21% #4213 recycle unresolved references hash maps (overlookmotel)
  • 05.00% #4329 remove name from reference (Dunqing)
  • 04.95% #8012 allocate symbol data in Allocator (Boshen)
  • 04.44% #4162 store unresolved refs in a stack (lucab)
  • 04.39% #2793 incorrect ExportEntry span for ExportAllDeclaration in ModuleRecord (Dunqing)
  • 04.10% #4216 reduce memory copies (overlookmotel)
  • 03.77% #8019 change Bindings to a plain FxHashMap (Boshen)
  • 03.66% #3694 expose 1 checker function instead of 2 (Boshen)
  • 03.39% #4401 use Atom instead of CompactStr for UnresolvedReferencesStack (Dunqing)
  • 03.10% #7886 re-export all flags and ID types (overlookmotel)
  • 00.00% #4140 faster search for leading comments (Boshen)

semantic/cfg

  • 05.63% #3223 add explicit break block element. (rzvxa)

semantic/jsdoc

  • 03.38% #2960 Handle optional type syntax for type name part (leaysgur)
  • 03.01% #2765 JSDocTag parser rework (leaysgur)

sourcemap

  • 12.09% #2728 remove unnecessary binary search (underfin)
  • 08.93% #7926 improve perf of search_original_line_and_column (camc314)
  • 06.04% #2779 enable_source_map using Arc instead of String (underfin)
  • 04.58% #4638 reduce string copying in ConcatSourceMapBuilder (overlookmotel)
  • 03.56% #4487 use simd to escape JSON string (Brooooooklyn)
  • 03.43% #4476 pre allocate String buf while encoding (Brooooooklyn)
  • 03.30% #4586 shorten main loop encoding VLQ (overlookmotel)
  • 03.02% #2910 optional JSONSourceMap fileds (underfin)
  • 00.00% #2889 using serde_json::to_string to quote sourcemap string (underfin)

span

  • 16.85% #8297 all methods take owned Span (overlookmotel)
  • 16.85% #8298 align Span same as usize (overlookmotel)
  • 03.31% #8479 add Atom::r#static (kermanx)

syntax,codegen

  • 04.24% #12821 Replace ryu_js with dragonbox_ecma for floating point formatting (copilot-swe-agent)

tasks

  • 06.88% #1965 Add eslint-plugin-jsdoc rulegen (leaysgur)
  • 05.24% #1593 add visualize_end_of_line (mysteryven)
  • 05.24% #1615 escape more special characters (mysteryven)
  • 03.10% #2787 speed up NAPI parser benchmark build (overlookmotel)
  • 03.05% #2783 separate NAPI benchmark CI job (overlookmotel)

tasks/benchmark

  • 06.72% #13418 remove the unstable small file for mangler benchmark (Boshen)

tasks/rulegen

  • 03.49% #2903 read quasi in TaggedTemplateExpression (mysteryven)

tasks/transforme_conformance

  • 05.12% #2835 support for testing oxc's test cases (Dunqing)

tasks/website

  • 03.87% #3386 start generating linter config markdown from json schema (Boshen)

transformer

  • 22.40% #10759 faster UID generation (overlookmotel)
  • 15.00% #7037 add TransformerOptions::env with EnvOptions (Boshen)
  • 07.15% #5751 call transform_jsx in exit_expression rather than enter_expression (Dunqing)
  • 07.10% #3760 move and simplify TS enum transform entry point (overlookmotel)
  • 07.02% #3536 validate JSX pragma options (overlookmotel)
  • 06.80% #3614 do not add __source for generated nodes (overlookmotel)
  • 06.66% #6118 share TransformCtx with ref not Rc (overlookmotel)
  • 06.54% #2937 implement plugin-transform-react-display-name top-down (Boshen)
  • 04.32% #2950 add the most basic plugin toggles (Boshen)
  • 04.19% #5850 arrow function transform: calculate whether this is in arrow function lazily (Dunqing)
  • 03.79% #3224 correctly jsx-self inside arrow-function (Dunqing)
  • 03.67% #3002 react development default value should be false (Boshen)
  • 03.60% #5482 pre-calculate unsupported flags in RegExp transform (overlookmotel)
  • 03.60% #10356 eliminate ExportSpecifier where refers to a declare declaration (Dunqing)
  • 03.27% #7756 duplicate_expression take mutated_symbol_needs_temp_var param (overlookmotel)
  • 03.13% #2795 numeric separator plugin. (rzvxa)
  • 00.00% #3140 remove the requirement of Semantic (Boshen)
  • 00.00% #5518 memoize rope instance (Dunqing)

transformer/arrow-functions

  • 10.12% #7322 move arguments transform checks to aid inlining (overlookmotel)
  • 03.27% #8435 transform this and super incorrectly in async arrow function (Dunqing)

transformer/class-properties

  • 06.34% #10418 return early if no private fields are found (Dunqing)
  • 05.60% #7483 transform private property accesses in static prop initializers (overlookmotel)
  • 03.28% #7997 transform super update expressions within static prop initializer (Dunqing)

transformer/jsx

  • 04.45% #9209 simplify and remove all AstBuilder::copy usages (Dunqing)

transformer/logic-assignment-operator

  • 03.16% #7744 inline enter_expression visitor (overlookmotel)

transformer/react

  • 17.12% #3141 enable jsx plugin when development is true (Dunqing)

transformer/react-jsx

  • 05.22% #1182 support @jsx annotation (Dunqing)

transformer/react-refresh

  • 20.79% #6884 use VarDeclarations to insert declarators (Dunqing)
  • 19.24% #6881 use StatementInjector to insert statements (Dunqing)

traverse

  • 15.53% #3794 disable syntax check and disable build module record (Boshen)
  • 07.99% #5272 add debug asserts for safety invariants (overlookmotel)
  • 06.30% #10562 use ArenaString instead CompactString to store UID name (Dunqing)
  • 03.90% #11770 introduce TraverseCtx<'a, State> (Boshen)
  • 00.00% #5611 generate_uid cache available binding names (overlookmotel)
  • 00.00% #5626 faster string operations generating UIDs (overlookmotel)

wasm

  • 08.21% #5263 display correct scope IDs (overlookmotel)
  • 08.14% #5237 add option preserve_parens (sxzz)
@Sysix
Copy link

Sysix commented Sep 29, 2025

03.31% oxc-project/oxc#13741 add space after extends in TSInterfaceDeclaration (Sysix)

Sounds wrong, I guess it is only improved because it fixes ts parser fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment