Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freelist: Performance, replace shift() with pop() #2174

Closed
wants to merge 1 commit into from
Closed

freelist: Performance, replace shift() with pop() #2174

wants to merge 1 commit into from

Commits on Jan 27, 2016

  1. 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.
    subzey committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    8684e0e View commit details
    Browse the repository at this point in the history