-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve compression of undefined, NaN & Infinitiy #1748
Conversation
Maintains identical behaviour, but move all the transformation logic from `OutputStream` to `Compressor`.
So, just to confirm - I think That just leaves |
So that Chrome performance degradation only applies to |
And to clarify, I think the forced
|
Current PR passed half a mega-fuzz without incident. Proceed with Phase 2. 😎 |
As far as I know. |
- migrate transformation logic from `OutputStream` to `Compressor` - always turn `undefined` into `void 0` (unless `unsafe`) - always keep `NaN` except when avoiding local variable redefinition - introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition supersedes mishoo#1723 fixes mishoo#1730
@alexlamsl Kudos for the elimination of
+1 |
@kzc glad you like it 😉 |
Maintains identical behaviour, but move all the transformation logic from
OutputStream
toCompressor
.Next up would be to implement #1730.
@kzc if you want
Infinity
➡️1/0
&undefined
➡️void 0
to be gated behind a new flag (default enabled), mind coming up with a good name for it? 😅