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
Fix frame vector size #62
Conversation
`push_back` is replaced by direct indexing since `std::vector<uintptr_t> output(n);` already creates a a vector with n elements (set to 0).
Overall package sizeSelf size: 1.44 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
@@ -31,7 +31,7 @@ std::vector<uintptr_t> MakeFrames(v8::Isolate* isolate) { | |||
std::vector<uintptr_t> output(n); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed we already resize it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just curious, is there any perf difference between the two if the size is already set? I pretty much just used push_back out of habit. 😅
The issue here is not performance:
|
Ah, good to know. For some reason I was thinking it worked like |
`push_back` is replaced by direct indexing since `std::vector<uintptr_t> output(n);` already creates a a vector with n elements (set to 0).
push_back
is replaced by direct indexing sincestd::vector<uintptr_t> output(n);
already creates a a vector with n elements (set to 0).