Skip to content

Conversation

@jasnell
Copy link
Member

@jasnell jasnell commented Apr 29, 2017

Refactor to use the more efficient module.exports = {} pattern and change up the internal objects to use ES6 classes. Benchmarking shows a minor perf improvement under turbo / ignition (not compelling enough by itself, but it's there).

/cc @Fishrock123

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

timers

@nodejs-github-bot nodejs-github-bot added the timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. label Apr 29, 2017
@benjamingr
Copy link
Member

Also cc @mscdex

@mscdex
Copy link
Contributor

mscdex commented Apr 29, 2017

What are the benchmark results like with Crankshaft (assuming this PR would get backported)?

@Fishrock123
Copy link
Contributor

"good luck backporting this" ... I guess?

@jasnell
Copy link
Member Author

jasnell commented Apr 29, 2017

@mscdex ... no significant variance from current master... (although, I must say that master compared to 7.9 is rather concerning independent of this PR).

Backporting shouldn't be a priority at all with this, but the separate module.exports = {} commit should be easily backportable. The ES6 classes one wouldn't need to be.

@TimothyGu
Copy link
Member

Is changing to ES6 classes backwards compatible? The prototype methods will no longer be enumerable after such a change.

@jasnell
Copy link
Member Author

jasnell commented May 1, 2017

@TimothyGu ... good question. It's likely better to be defensive about it tho.

@jasnell jasnell closed this Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants