mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 15:30:56 +01:00
b677b844fc
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> |
||
---|---|---|
.. | ||
2100bytes.js | ||
2100bytes.out | ||
error_exit.js | ||
error_exit.out | ||
eval_messages.js | ||
eval_messages.out | ||
hello_world.js | ||
hello_world.out | ||
max_tick_depth.js | ||
max_tick_depth.out | ||
nexttick_throw.js | ||
nexttick_throw.out | ||
stack_overflow.js | ||
stack_overflow.out | ||
stdin_messages.js | ||
stdin_messages.out | ||
testcfg.py | ||
throw_custom_error.js | ||
throw_custom_error.out | ||
throw_in_line_with_tabs.js | ||
throw_in_line_with_tabs.out | ||
throw_non_error.js | ||
throw_non_error.out | ||
throw_null.js | ||
throw_null.out | ||
throw_undefined.js | ||
throw_undefined.out | ||
timeout_throw.js | ||
timeout_throw.out | ||
undefined_reference_in_new_context.js | ||
undefined_reference_in_new_context.out | ||
vm_display_runtime_error.js | ||
vm_display_runtime_error.out | ||
vm_display_syntax_error.js | ||
vm_display_syntax_error.out | ||
vm_dont_display_runtime_error.js | ||
vm_dont_display_runtime_error.out | ||
vm_dont_display_syntax_error.js | ||
vm_dont_display_syntax_error.out |