| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
|
No performance regression as such https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/866/console |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
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. PR-URL: #36748 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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. PR-URL: #36748 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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. PR-URL: #36748 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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. PR-URL: #36748 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
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.
Checklist