Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove performance, and reduce code size, for JsArray. #874
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
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
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
Skinney commentedJun 16, 2017
_JsArray_newArraywas 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_initializeFromListhas 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_unsafeSethas 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.