50% time on Dromaeo Selector * benchmark spent allocating oversized backing stores...
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jan 2014 02:02:29 +0000 (02:02 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jan 2014 02:02:29 +0000 (02:02 +0000)
commit3910d37ecea09a69c92094b4f50bb778d0897d8b
tree7d7d1cf1b9af0a648113b009acc3db27891aa972
parent1fb414e5e4a058cb0ac89b66d203d999c29691db
50% time on Dromaeo Selector * benchmark spent allocating oversized backing stores (but not in Chrome)
https://bugs.webkit.org/show_bug.cgi?id=127879

Reviewed by Gavin Barraclough.

Let's not dynamically resize an array whose size is statically known,
mmmkay?

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncConcat): Use nullptr to disambiguate vs the numeric
argument.

(JSC::arrayProtoFuncSlice): The fix.

(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap): Use nullptr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ArrayPrototype.cpp