oxc/crates
overlookmotel d17021c834 perf(mangler): optimize base54 function (#8557)
Optimize mangler by creating identifiers in an inline array, instead of using the more expensive `CompactString`, and optimize `base54` function.

There's an unfortunate workaround necessary because of debug mode. In "normal" mode, identifiers are maximum 11 bytes (`usize::MAX` -> `ZrN6rN6rN6r`) but in debug mode they can be up to 25 bytes (`usize::MAX` -> `slot_18446744073709551615`). So this PR splits `build_with_symbols_and_scopes` into 2 branches for "normal" and "debug" modes with a generic function parameterized by max length of the string.

This is not ideal - it will increase binary size a bit, but everything else I tried (e.g. allocating strings into arena) was much slower.

The main motivation for this change wasn't actually performance. While working on allocator, I discovered that `CompactString`s were being allocated in arena (`reserved_names: ArenaVec<CompactStr>`), and wanted to remove them.
2025-01-17 05:47:28 +00:00
..
oxc fix(semantic)!: ensure program outlives semantic (#8455) 2025-01-16 10:04:25 +08:00
oxc_allocator feat(allocator): add HashMap (#8553) 2025-01-16 23:29:57 +00:00
oxc_ast fix(codegen): shorthand assignment target identifier consider mangled names (#8536) 2025-01-16 07:26:07 +00:00
oxc_ast_macros feat(ast, span, syntax, regular_expression)!: remove ContentHash (#8512) 2025-01-15 15:01:14 +00:00
oxc_cfg release(crates): v0.46.0 (#8487) 2025-01-14 19:40:44 +08:00
oxc_codegen fix(codegen): shorthand assignment target identifier consider mangled names (#8536) 2025-01-16 07:26:07 +00:00
oxc_data_structures release(crates): v0.46.0 (#8487) 2025-01-14 19:40:44 +08:00
oxc_diagnostics refactor(linter): move DiagnosticsReporters to oxlint (#8454) 2025-01-16 16:11:22 +08:00
oxc_ecmascript feat(minifier): improve .charCodeAt(arg) when arg is valid (#8534) 2025-01-16 06:36:34 +00:00
oxc_estree release(crates): v0.46.0 (#8487) 2025-01-14 19:40:44 +08:00
oxc_isolated_declarations release(crates): v0.46.0 (#8487) 2025-01-14 19:40:44 +08:00
oxc_language_server
oxc_linter refactor(linter/consistent-function-scoping): remove Visit::enter_node usage (#8538) 2025-01-16 11:00:11 +00:00
oxc_macros chore(deps): update rust crates (#8452) 2025-01-15 13:29:46 +00:00
oxc_mangler perf(mangler): optimize base54 function (#8557) 2025-01-17 05:47:28 +00:00
oxc_minifier fix(minifer): keep idents if not in scope when minimizing array exprs (#8551) 2025-01-16 14:26:37 +00:00
oxc_napi release(crates): v0.46.0 (#8487) 2025-01-14 19:40:44 +08:00
oxc_parser feat(napi/parser): expose dynamic import expressions (#8540) 2025-01-16 22:25:22 +08:00
oxc_prettier refactor(prettier): Verify printing class related nodes (#8559) 2025-01-17 13:46:07 +08:00
oxc_regular_expression feat(ast, span, syntax, regular_expression)!: remove ContentHash (#8512) 2025-01-15 15:01:14 +00:00
oxc_semantic perf(semantic): use oxc_allocator::HashMap in ScopeTree (#8554) 2025-01-16 23:29:58 +00:00
oxc_span feat(ast, span, syntax, regular_expression)!: remove ContentHash (#8512) 2025-01-15 15:01:14 +00:00
oxc_syntax feat(napi/parser): expose dynamic import expressions (#8540) 2025-01-16 22:25:22 +08:00
oxc_transformer fix(transformer/class-static-blocks): static block converted to IIFE use span of original block (#8549) 2025-01-16 14:55:53 +00:00
oxc_traverse refactor(traverse): remove unnecessary #[allow] (#8518) 2025-01-15 17:38:03 +00:00
oxc_wasm feat(napi/minify): implement napi (#8478) 2025-01-14 08:55:55 +00:00