0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/benchmark/misc
Anton Khlynovskiy c647e87504 lib: freelist: use .pop() for allocation
Array#pop() is known to be faster than Array#shift().
To be exact, it's O(1) vs. O(n). In this case there's no difference
from which side of the "pool" array the object is retrieved,
so .pop() should be preferred.

PR-URL: https://github.com/nodejs/node/pull/2174
Reviewed-By: mscdex - Brian White <mscdex@mscdex.net>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
2016-03-02 09:24:24 -08:00
..
function_call tools,benchmark: increase lint compliance 2016-02-27 20:15:17 -08:00
freelist.js lib: freelist: use .pop() for allocation 2016-03-02 09:24:24 -08:00
startup.js tools,benchmark: increase lint compliance 2016-02-27 20:15:17 -08:00
string-creation.js tools,benchmark: increase lint compliance 2016-02-27 20:15:17 -08:00
v8-bench.js benchmark: use strict mode 2016-02-22 11:09:26 -08:00