FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib: don't penalize setInterval/setTimeout common case by bnoordhuis · Pull Request #1221 · nodejs/node · GitHub

Repository navigation

lib: don't penalize setInterval/setTimeout common case - #1221

Merged
bnoordhuis merged 3 commits into
nodejs:v1.xfrom
bnoordhuis:optimize-timers
Mar 21, 2015
Merged

bnoordhuis merged 3 commits into
nodejs:v1.xfrom
bnoordhuis:optimize-timers

Conversation

Copy link
Copy Markdown
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?

Copy link
Copy Markdown
Contributor

Origin commit: bd1bd7e

Copy link
Copy Markdown
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 <trev.norris@gmail.com>
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 <trev.norris@gmail.com>
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 <trev.norris@gmail.com>

Copy link
Copy Markdown
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 closed this Mar 21, 2015
bnoordhuis deleted the optimize-timers branch March 21, 2015 10:09
bnoordhuis merged commit 2b3b2d3 into nodejs:v1.x Mar 21, 2015
rvagg mentioned this pull request Mar 22, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL