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 performance, and reduce code size, for JsArray. #874

Merged
merged 1 commit into from Jun 16, 2017

Conversation

Projects
None yet
3 participants
@Skinney
Contributor

Skinney commented Jun 16, 2017

_JsArray_newArray was introduced because it had a noticeable performance impact in Safari. In recent benchmarking, this no longer seems to be the case. Removing this function saves some bytes while improving performance in Chrome. Safari is unaffected. Firefox loses some performance, but not nearly as much performance as Chrome gains.

_JsArray_initializeFromList has been altered so that it is no longer necessary with an if-statement in the body of the for-loop. This makes it easier for Chrome to optimize. As such, converting a List to an Array is now 6x faster in Chrome. Minor performance improvements in Safari and Firefox.

_JsArray_unsafeSet has been rewritten to manually copy the array instead of using .slice. This improves performance in both Safari and Chrome. There is some performance degredation in Firefox, but not nearly as much as the increase in Safari and Chrome.

Improve performance, and reduce code size, for JsArray.
_JsArray_newArray was introduced because it had a noticable performance impact in Safari. In recent benchmarking, this no longer seems to be the case. Removing this function saves some bytes while improving performance in Chrome. Safari is unaffected. Firefox loses some performance, but not nearly as much performance as Chrome gains.

_JsArray_initializeFromList has been altered so that it is no longer necessary with an if-statement in the body of the for-loop. This makes it easier for Chrome to optimize. As such, converting a List to an Array is now 6x faster in Chrome. Minor performance improvements in Safari and Firefox.

_JsArray_unsafeSet has been rewritten to manually copy the array instead of using .slice. This improves performance in both Safari and Chrome. There is some performance degredation in Firefox, but not nearly as much as the increase in Safari and Chrome.
@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Jun 16, 2017

Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Jun 16, 2017

Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz evancz merged commit e4a2c07 into elm:dev Jun 16, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment