-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
assert: improve assert()/assert.ok() performance #19292
Conversation
lib/assert.js
Outdated
function innerOk(args, fn) { | ||
var [value, message] = args; | ||
|
||
function innerOk(fn, argc, value, message) { |
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.
Nit: argc is not really commonly used in JS and not everyone might know the terminology. So I suggest to switch to argLength.
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.
updated parameter name
2ae9b1d
to
66ce648
Compare
PR-URL: nodejs#19292 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Should this be backported to |
I added the label to prevent backporting this. It relies on a semver-major change. |
With included benchmark:
CI: https://ci.nodejs.org/job/node-test-pull-request/13637/
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes