joyent/node — pull request #4918 by fb55 (2013-03-05 08:24:20+00:00)
Title: events: Loop backwards in removeListener

This slowed removeAllListeners down (was `O(n^2)`, is now `O(1)`).

Of course, there are cases where the opposite is true; node should probably switch to ES6 sets as soon as they are an alternative (ie. enabled by default in V8 and fast enough).