Skip to content
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

Doc: "keep_infinity" is redundant on modern Chrome #2743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robpalme
Copy link

@robpalme robpalme commented Jan 7, 2018

Clarify that "keep_infinity" compress option is only useful for older versions of Chrome.

The initial performance assessment that concluded Infinity was faster than 1/0 was based on Chrome 57.
#1723 (comment)

Chrome 63 suffers no such degradation.
https://jsperf.com/infinity-vs-1-0-v2-0

Clarify that "keep_infinity" compress option is only useful for older versions of Chrome.

The initial performance assessment that concluded `Infinity` was faster than `1/0` was based on Chrome 57.
mishoo#1723 (comment)

Chrome 63 suffers no such degradation.
https://jsperf.com/infinity-vs-1-0-v2-0
@alexlamsl
Copy link
Collaborator

/cc @kzc

@kzc
Copy link
Contributor

kzc commented Jan 7, 2018

Chrome no longer penalizes 1/0 over Infinity, but it's interesting to note that the benchmark runs 2.5X faster in Safari.

The default is:

        keep_infinity : false,

No harm keeping the option.

@@ -658,7 +658,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
`Function.prototype.name`. See also: the `keep_fnames` [mangle option](#mangle).

- `keep_infinity` (default: `false`) -- Pass `true` to prevent `Infinity` from
being compressed into `1/0`, which may cause performance issues on Chrome.
being compressed into `1/0`, which may cause performance issues on old versions of Chrome.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to state when Chrome reached performance parity for 1/0 and Infinity. If not the specific version, at least the year.

@alfaproject
Copy link

Not that having more options is bad, but does anyone out there actually switches this on?

@robpalme
Copy link
Author

robpalme commented Jan 7, 2018 via email

@alfaproject
Copy link

They don't even use Infinity. (;

@jdalton
Copy link

jdalton commented Jan 25, 2018

They don't even use Infinity. (;

Maintainer of @std/esm here:
We minify our bundle which includes parts of libraries, like acorn, that do use Infinity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants