Skip to content

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

Open
robpalme wants to merge 1 commit intomishoo:masterfrom
robpalme:patch-1
Open

Doc: "keep_infinity" is redundant on modern Chrome#2743
robpalme wants to merge 1 commit intomishoo:masterfrom
robpalme:patch-1

Conversation

@robpalme
Copy link
Copy Markdown

@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
Copy Markdown
Collaborator

/cc @kzc

@kzc
Copy link
Copy Markdown
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.

Comment thread README.md

- `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
Copy Markdown
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
Copy Markdown

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

@robpalme
Copy link
Copy Markdown
Author

robpalme commented Jan 7, 2018 via email

@alfaproject
Copy link
Copy Markdown

They don't even use Infinity. (;

@jdalton
Copy link
Copy Markdown

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.

5 participants