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 upDev: Fixes runtime crash when slicing a large array so it becomes small (< 32 elements) #865
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
May 12, 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
May 12, 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. |
Skinney
changed the title from
Fixes runtime crash when slicing a large array so it becomes small (< 32 elements)
to
Dev: Fixes runtime crash when slicing a large array so it becomes small (< 32 elements)
May 12, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Skinney
May 12, 2017
Contributor
Hmm. That second commit was supposed to be a different PR. It's a harmless change though.
It doubles performance of _JsArray_push in Chrome and Safari (no change in Firefox). A similar change of the _JsArray_set function also had some performance increase in Chrome and Safari, but had the opposite effect (way worse performance) in Firefox.
|
Hmm. That second commit was supposed to be a different PR. It's a harmless change though. It doubles performance of |
evancz
merged commit 779b5f5
into
elm:dev
May 12, 2017
1 check failed
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Thanks! :) |
Skinney commentedMay 12, 2017
Includes test to reproduce issue.
The first problem was that depth calculation when slicing down to a one element array (slice 0 1 array) would return
NaN, which is a setup for failure.The second problem was the assumption that
hoistTreealways would be called with a tree with a size of > 1.