Skip to content

feat(minifier): compress assignment to prefix increment#10244

Merged
Boshen merged 3 commits intooxc-project:mainfrom
ulrichstark:compress-assignment-to-prefix-increment
Apr 7, 2025
Merged

feat(minifier): compress assignment to prefix increment#10244
Boshen merged 3 commits intooxc-project:mainfrom
ulrichstark:compress-assignment-to-prefix-increment

Conversation

@ulrichstark
Copy link
Contributor

@ulrichstark ulrichstark commented Apr 4, 2025

Fixes one test previously commented out in #8604.

The removed match arm for UnaryNegation was probably unnecessary because UnaryExpression(UnaryNegation, NumericLiteral(1)) seems to be evaluated to NumericLiteral(-1) in a preceding minifier step and all tests are still green. But I might be wrong as this is my first contribution to the minifier.

@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 4, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Apr 4, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 4, 2025

CodSpeed Instrumentation Performance Report

Merging #10244 will degrade performances by 5.09%

Comparing ulrichstark:compress-assignment-to-prefix-increment (5138c8b) with main (f7ff816)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 34 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
formatter[antd.js] 7.9 ms 7.6 ms +3.67%
formatter[typescript.js] 7.2 ms 7.6 ms -5.09%

@Boshen Boshen self-requested a review April 5, 2025 03:18
@Boshen Boshen self-assigned this Apr 5, 2025
@Boshen Boshen merged commit 603abdc into oxc-project:main Apr 7, 2025
24 checks passed
@ulrichstark ulrichstark deleted the compress-assignment-to-prefix-increment branch April 8, 2025 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants