Skip to content

Conversation

bnoordhuis
Copy link
Member

The common case is where setTimeout() is called with two arguments,
the callback and the timeout. Specifying optional arguments in the
parameter list forces common case calls to go through an arguments
adaptor stack frame.

R=@trevnorris?

@Fishrock123
Copy link
Contributor

Origin commit: bd1bd7e

@bnoordhuis
Copy link
Member Author

The common case is where setTimeout() is called with two arguments,
the callback and the timeout.  Specifying optional arguments in the
parameter list forces common case calls to go through an arguments
adaptor stack frame.

PR-URL: nodejs#1221
Reviewed-By: Trevor Norris <[email protected]>
The common case is where setInterval() is called with two arguments,
the callback and the timeout.  Specifying optional arguments in
the parameter list forces common case calls to go through an arguments
adaptor stack frame.

PR-URL: nodejs#1221
Reviewed-By: Trevor Norris <[email protected]>
It turns out we have little to no test coverage for setTimeout() and
setInterval() calls with optional arguments.  Now we do.

PR-URL: nodejs#1221
Reviewed-By: Trevor Norris <[email protected]>
@trevnorris
Copy link
Contributor

LGTM

Aside: Thought the penalization was mostly fixed (so that the performance difference was essentially white noise) in V8 for calling a function with too many parameters. My bad for not catching that before it was pushed.

@bnoordhuis bnoordhuis closed this Mar 21, 2015
@bnoordhuis bnoordhuis deleted the optimize-timers branch March 21, 2015 10:09
@bnoordhuis bnoordhuis merged commit 2b3b2d3 into nodejs:v1.x Mar 21, 2015
@rvagg rvagg mentioned this pull request Mar 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants