[Webkit-unassigned] [Bug 41920] Avoid slow-path for put() in Array.splice()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 9 10:08:22 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=41920





--- Comment #4 from Oliver Hunt <oliver at apple.com>  2010-07-09 10:08:22 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > We should add a function to create a new array that will actually allocate sufficient space for the result as we know we will be producing a compact array of this size (...)
> 
> Oliver, why isn't enough to use the constructEmptyArray() variant that takes the initial length (the one the patch uses)? It preallocates for cases with size up to MIN_SPARE_ARRAY_INDEX (which is 10k).

new Array(100000).splice()

Won't allocate sufficient space, and setIndex does not do bounds checks

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list