Skip to content

Conversation

@armano2
Copy link

@armano2 armano2 commented Dec 8, 2025

supper early version

todo:

  • inline primitive defaults [a=1]=[2]
  • check for side effects
  • optimize code
  • add support for objects

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

codspeed-hq bot commented Dec 9, 2025

CodSpeed Performance Report

Merging #16580 will degrade performances by 4.15%

Comparing armano2:fix/inline-statements (741d76c) with main (dc793ad)1

Summary

❌ 1 regression
✅ 37 untouched
⏩ 7 skipped2

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

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
Simulation formatter[RadixUIAdoptionSection.jsx] 443.2 µs 462.3 µs -4.15%

Footnotes

  1. No successful run was found on main (1149b6a) during the generation of this report, so dc793ad was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@armano2
Copy link
Author

armano2 commented Dec 10, 2025

i have been playing around and trying to figure out some of cases for object assignments

initially i tough that i can just compress this

var { a, a: c } = { a: { f: 1 } }

to

var a = { f: 1}, c = a

this kinda gets annoying as syntax is really fluid eg.

var { a: { f }, a } = { a: { f: 1 } }

i think this should be collapsed to

var { f } = a = { f: 1 }

note:
we have to keep references correct,

eg.

var { a: { c }, a } = { a: { c: { d: {} } } }
console.log(c === a.c)

/// 

var { c } = a = { c: { d: {} } }
console.log(c === a.c)

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.

1 participant