Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve removeListener performance #60

Merged
merged 2 commits into from
May 9, 2016
Merged

Improve removeListener performance #60

merged 2 commits into from
May 9, 2016

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented May 8, 2016

This sligtly improves the removeListener performance when there is only one listener.

Result of once.js benchmark:

log:      Finished benchmarking: "EventEmitter3@1.2.0"
metric:   Count (51502), Cycles (5), Elapsed (5.592), Hz (913621.98)
log:      Finished benchmarking: "EventEmitter3(master)"
metric:   Count (55202), Cycles (4), Elapsed (5.583), Hz (978589.2)
info:     Benchmark: "EventEmitter3(master)" is the fastest.

Result of listening.js benchmark:

log:      Finished benchmarking: "EventEmitter3@1.2.0"
metric:   Count (58987), Cycles (5), Elapsed (5.745), Hz (1090032.06)
log:      Finished benchmarking: "EventEmitter3(master)"
metric:   Count (64261), Cycles (9), Elapsed (5.706), Hz (1181078.63)
info:     Benchmark: "EventEmitter3(master)" is the fastest.

@coveralls
Copy link

coveralls commented May 8, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling e0e422c on optimization into 009d550 on master.

@3rd-Eden
Copy link
Member

3rd-Eden commented May 9, 2016

LGTM

@3rd-Eden 3rd-Eden merged commit 6702e28 into master May 9, 2016
@3rd-Eden 3rd-Eden deleted the optimization branch May 9, 2016 08:00
@lpinca lpinca mentioned this pull request Sep 8, 2016
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.

None yet

3 participants