Rather than initing an empty array and filling, create an array of the correct size up-front. Minor gain on chromium, but considerably (~5x) faster in spidermonkey/firefox.
4 lines
131 B
JavaScript
4 lines
131 B
JavaScript
for (var LEN = ARGUMENTS.length, ARRAY = Array(ARRAY_LEN), KEY = START; KEY < LEN; KEY++) {
|
|
ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];
|
|
}
|