-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
net: misc changes #8112
net: misc changes #8112
Conversation
@@ -60,9 +60,8 @@ exports.createServer = function(options, connectionListener) { | |||
// connect(path, [cb]); | |||
// | |||
exports.connect = exports.createConnection = function() { |
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.
Perhaps switch to function(...args) {
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.
I haven't ran the relevant benchmarks recently (at least with v8 5.1), but I wouldn't be surprised if rest args are still slower.
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.
They are still a bit slower.
LGTM |
2 similar comments
LGTM |
LGTM |
CI again before landing: https://ci.nodejs.org/job/node-test-pull-request/3800/ |
4173297
to
2c0d094
Compare
V8 is smart enough to optimize the length property checking when iterating over an array with a for loop. PR-URL: nodejs#8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
This helps to prevent possible deoptimizations that arise when trying to access nonexistent indices. PR-URL: nodejs#8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
2c0d094
to
a206afe
Compare
V8 is smart enough to optimize the length property checking when iterating over an array with a for loop. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
This helps to prevent possible deoptimizations that arise when trying to access nonexistent indices. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
should this be backported? |
I would say it's safe to backport. |
V8 is smart enough to optimize the length property checking when iterating over an array with a for loop. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
This helps to prevent possible deoptimizations that arise when trying to access nonexistent indices. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 is smart enough to optimize the length property checking when iterating over an array with a for loop. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
This helps to prevent possible deoptimizations that arise when trying to access nonexistent indices. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 is smart enough to optimize the length property checking when iterating over an array with a for loop. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
This helps to prevent possible deoptimizations that arise when trying to access nonexistent indices. PR-URL: #8112 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Description of change