Skip to content

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.


- `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.

5 participants