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>
parent
6361c049
Please register or sign in to comment