Commit d3f8db12 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

lib: micro-optimize EventEmitter#removeListener()

Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.

Add a new benchmark to prove it.  With the change applied, it scores
a whopping 40% higher.

PR-URL: https://github.com/iojs/io.js/pull/185


Reviewed-By: default avatarChris Dickinson <christopher.s.dickinson@gmail.com>
parent d0c238cc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment