-
-
Notifications
You must be signed in to change notification settings - Fork 37.3k
events.js spliceOne is slower than splice #14081
Copy link
Copy link
Closed
Labels
eventsIssues and PRs related to EventEmitter and the events module.Issues and PRs related to EventEmitter and the events module.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.
Description
Activity
Metadata
Metadata
Assignees
Labels
eventsIssues and PRs related to EventEmitter and the events module.Issues and PRs related to EventEmitter and the events module.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.
when I inspect the source code of event emitter, I find code and comments in events.js as below:
But when test it, I find it's not faster but slower, the test code as below:
And I get the result as below:
so, Is there any reason for old version ? Or any other reasons?