Skip to content

Conversation

RafaelGSS
Copy link
Member

Applying one of @jasnell suggestions #54380 (comment)

Result an possible performance boost of ~14%

➜  node (optimize-getcallsite) node-benchmark-compare compare.csv                                                         ✭ ✱
                                                            confidence improvement accuracy (*)   (**)  (***)
util/get-callsite.js method='CPP' n=100                            ***     14.00 %       ±3.69% ±4.92% ±6.43%

@RafaelGSS RafaelGSS requested a review from jasnell September 30, 2024 11:48
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Sep 30, 2024
@avivkeller avivkeller added the needs-benchmark-ci PR that need a benchmark CI run. label Sep 30, 2024
@RafaelGSS
Copy link
Member Author

I believe the coverage errors are unrelated to this PR. Are we tracking it somewhere? @nodejs/build

@targos
Copy link
Member

targos commented Sep 30, 2024

It appeared with #53256. Unrelated to build WG activities.

src/node_util.cc Outdated
@@ -249,6 +250,7 @@ static void ParseEnv(const FunctionCallbackInfo<Value>& args) {
static void GetCallSite(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Isolate* isolate = env->isolate();
v8::HandleScope handle_scope(isolate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q for learning purposes: Why do we need a handle scope here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is no longer necessary. I was investigating a segmentation fault and though the variables were gcCollected before going back to JS.

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 30, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 30, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 30, 2024

@RafaelGSS
Copy link
Member Author

Is it ok if I go ahead and land this PR? Coverage should be solved on main, but rebasing would require a new CI run.

@RafaelGSS RafaelGSS added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Oct 2, 2024
RafaelGSS added a commit that referenced this pull request Oct 2, 2024
PR-URL: #55174
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
@RafaelGSS
Copy link
Member Author

Landed in 18536d9

@RafaelGSS RafaelGSS closed this Oct 2, 2024
targos pushed a commit that referenced this pull request Oct 4, 2024
PR-URL: #55174
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
targos pushed a commit that referenced this pull request Oct 4, 2024
PR-URL: #55174
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
@aduh95 aduh95 mentioned this pull request Oct 9, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#55174
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
@marco-ippolito marco-ippolito added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Nov 16, 2024
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
PR-URL: nodejs#55174
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants