Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
lib: reduce overhead of validateObject#49928
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
aduh95 commented Sep 28, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1427/ Results |
anonrig left a comment
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.
🚀
nodejs-github-bot commented Sep 28, 2023
Uh oh!
There was an error while loading. Please reload this page.
benjamingr left a comment
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.
I wonder if it wouldn't be better to just split it into 2 functions (one for default other with options) and if that would let us avoid the bit sorcery and still see the performance improvement.
H4ad commented Sep 28, 2023
@benjamingr Maybe, the bit sorcery still needed to not have a bunch of duplicated functions (one for each combination). I can introduce internal functions but I don't think that will be worth adding one more |
aduh95 left a comment
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.
According to #49928 (comment), this has little effect on the overall performance of Node.js. Still a good change to see.
nodejs-github-bot commented Sep 29, 2023
nodejs-github-bot commented Sep 30, 2023
nodejs-github-bot commented Sep 30, 2023
nodejs-github-bot commented Sep 30, 2023
nodejs-github-bot commented Oct 2, 2023
Landed in 952cf0d |
PR-URL: nodejs#49928 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #49928 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#49928 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Reducing the number of comparisons and allocations when using
validateObject.