Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2015-02-12 01:00:12 +0300
committerBen Noordhuis <info@bnoordhuis.nl>2015-02-12 01:06:26 +0300
commit7061669dba26337e47e258385dd58e400881dff1 (patch)
treef6e4032f2c52c3ee2b30c32f22e6f07b5b9650a8 /src/util-inl.h
parent630f63633490f60a292e62bb7a82bd9ea4de68c4 (diff)
events: optimize adding and removing of listeners
These optimizations result in >2x speedup in the ee-add-remove benchmark: * Don't mutate array.length when removing the last listener for an event * Don't bother checking max listeners if listeners isn't an array * Don't call delete when removing the last event in _events, just re-assign a new object instead PR-URL: https://github.com/iojs/io.js/pull/785 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com>
Diffstat (limited to 'src/util-inl.h')
0 files changed, 0 insertions, 0 deletions