-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
- Version: v7 and master
- Platform: Mac
- Subsystem:
instanceof
checks has become almost 100 times slower in Node v7+ (and current master)
var r = /hello/
console.time('instanceof RegExp')
for (var i = 0; i < 100000000; i++) {
r instanceof RegExp
}
console.timeEnd('instanceof RegExp')
var o = {}
console.time('instanceof Object')
for (var i = 0; i < 100000000; i++) {
o instanceof Object
}
console.timeEnd('instanceof Object')
In node v6:
$ node instanceof.js
instanceof RegExp: 133.519ms
instanceof Object: 134.572ms
In node v7:
$ node instanceof.js
instanceof RegExp: 9858.616ms
instanceof Object: 9839.696ms
I know this is a problem in V8, but I think it's good to track it here as well.
v8 issue: https://bugs.chromium.org/p/v8/issues/detail?id=5640
cc @fhinkel
bradvogel and lalugeo
Metadata
Metadata
Assignees
Labels
performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.