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

core-js/es6/promise from 2.5.7 causes a slowdown on some array operations. #420

Closed
vlajos opened this issue Aug 10, 2018 · 3 comments
Closed
Labels

Comments

@vlajos
Copy link

vlajos commented Aug 10, 2018

The same thing happens as described here: #377
when I used the promise module like this:

import 'core-js/es6/promise';

I used this timer script to "detect" the issue:

var arr = [];
for (var i=0; i<3200000; i++) {
    arr.push(Math.random())
}
var startTime = performance.now();

x = new Float32Array(arr);

document.write('Time spent: ' + (performance.now() - startTime) + ' ms');

The time needed to run the loop is around 100x bigger when the promise is imported.

(If you think it helps I am happy to create similar more detailed test scripts like in the other issue.)

@zloirock
Copy link
Owner

What about core-js@3? I have no ideas how it can touch typed arrays. I'll test it later.

@vlajos
Copy link
Author

vlajos commented Aug 10, 2018

@zloirock With 3.0.0-beta.3 our app seems to be quick.

@zloirock
Copy link
Owner

I don't wanna rewrite all possible problem cases in legacy core-js@2 branch if it works in core-js@3. Feel free to add a PR to v2 branch if performance of core-js@2 is something critical for you.

@zloirock zloirock added the v2 label Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants