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

os: performance improvement in vector allocation #36748

Closed
wants to merge 1 commit into from

Commits on Jan 3, 2021

  1. os: performance improvement in vector allocation

    We were using the result vector with an object which is not a primitive
    data type, and going with the constructor allocation pattern it creates
    a size of that vector and also initializes the spaces with the data type
    as well which is in our case is `Local<Value>`. It leads to waste of
    some CPU cycles and instead we just wanted to have some reserved space
    in our vector.
    
    We can use `reserve` method on vector to reserve some space for the
    vector but doesn't initialize the value since we are anyways doing it in
    the following loop.
    yashLadha committed Jan 3, 2021
    Configuration menu
    Copy the full SHA
    aa24929 View commit details
    Browse the repository at this point in the history