Avatar for the oxc-project user
oxc-project
oxc
BlogDocsChangelog

Performance History

Latest Results

feat(minifier): minify `x ? 1 : 0` to `+x` or `+!!x` (#20594) Closes #20288 Adds numeric conditional expression optimization to the minifier: - `x ? 1 : 0` → `+x` when `x` is known boolean (saves 3 chars) - `x ? 1 : 0` → `+!!x` when `x` is unknown type and no parens needed (saves 1 char) - `x ? 0 : 1` → `+!x` when no parens needed (saves 2 chars) - Skips when parentheses would make the result the same length or longer (e.g., `a+b?1:0`) Profitability checks are based on the lessons from swc-project/swc#9920. Implementation note: uses `DetermineValueType` to check if the test expression is boolean, and a simple `test_needs_parens` helper (matching `BinaryExpression`, `LogicalExpression`, etc.) to determine if wrapping would negate the savings. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
main
4 hours ago
refactor(lexer): revert `Kind` methods to normal matches
om/03-23-refactor_lexer_revert_kind_methods_to_normal_matches
7 hours ago
refactor(lexer): revert `Kind` methods to normal matches
om/03-23-refactor_lexer_revert_kind_methods_to_normal_matches
7 hours ago
refactor(lexer): revert `Kind` methods to normal matches
om/03-23-refactor_lexer_revert_kind_methods_to_normal_matches
8 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
refactor(lexer): revert `Kind` methods to normal matches#20655
8 hours ago
90936b8
om/03-23-refactor_lexer_revert_kind_methods_to_normal_matches
CodSpeed Performance Gauge
0%
1 month ago
b8470d3
om/02-20-perf_allocator_remove_op_from_stringbuilder_grow_one_
CodSpeed Performance Gauge
0%
Ā© 2026 CodSpeed Technology
Home Terms Privacy Docs