node/lib
Brian White b677b844fc events: optimize various functions
Cache events and listeners objects where possible and loop over
Object.keys() instead of using for..in. These changes alone give
~60-65% improvement in the ee-add-remove benchmark.

The changes to EventEmitter.listenerCount() gives ~14%
improvement and changes to emitter.listeners() gives
significant improvements for <50 listeners
(~195% improvement for 10 listeners).

The changes to emitter.emit() gives 3x speedup for the fast
cases with multiple handlers and a minor speedup for the slow
case with multiple handlers.

The swapping out of the util.is* type checking functions with inline
checks gives another ~5-10% improvement.

PR-URL: https://github.com/iojs/io.js/pull/601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-02-09 17:47:49 +01:00
..
_debug_agent.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_debugger.js lib: make debug client connect to 127.0.0.1 2015-02-06 16:49:47 +01:00
_http_agent.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_http_client.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_http_common.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_http_incoming.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_http_outgoing.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_http_server.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_linklist.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
_stream_duplex.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_stream_passthrough.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_stream_readable.js stream: simpler stream constructon 2015-02-04 20:19:39 -08:00
_stream_transform.js stream: simpler stream constructon 2015-02-04 20:19:39 -08:00
_stream_writable.js stream: simpler stream constructon 2015-02-04 20:19:39 -08:00
_tls_common.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_tls_legacy.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_tls_wrap.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
assert.js assert: introduce `deepStrictEqual` 2015-02-09 14:14:20 +03:00
buffer.js buffer: don't compare same buffers 2015-02-07 00:08:40 +02:00
child_process.js child_process: add debug and error details 2015-02-05 12:58:15 -05:00
cluster.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
console.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
constants.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
crypto.js crypto: support passwords in publicEncrypt 2015-02-02 23:21:49 +01:00
dgram.js dgram: check close callback is function 2015-02-02 18:44:05 +01:00
dns.js dns: allow dns.lookup() to return all addresses 2015-02-06 17:18:47 -05:00
domain.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
events.js events: optimize various functions 2015-02-09 17:47:49 +01:00
freelist.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
fs.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
http.js http: replace util._extend() with [].slice() 2015-02-02 14:52:02 -08:00
https.js https: simpler argument check 2015-02-07 12:00:16 -08:00
module.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
net.js net: check close callback is function 2015-02-02 18:45:34 +01:00
os.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
path.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
process.js src: remove excessive license boilerplate 2015-01-27 16:35:05 +11:00
punycode.js punycode: update to v1.3.2 2014-11-28 13:21:43 +03:00
querystring.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
readline.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
repl.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
smalloc.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
stream.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
string_decoder.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
sys.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
timers.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
tls.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
tty.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
url.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
util.js util: simplify `isPrimitive` 2015-02-07 17:41:44 +03:00
v8.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
vm.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
zlib.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00