joyent/node — pull request #5559 by tricknotes (2013-05-25 20:10:29+00:00)
Title: events: define properties to prototype

To define the properties that will be defined in constructor brings up higher performance.

I tested by the following benchmark:

``` javascript
var events = require('events');
var EventEmitter = events.EventEmitter;

var count = 100000000;
var i, now;

now = Date.now();

for (i = 0; i < count; i++) {
new EventEmitter();
}

console.log('%d ms', Date.now() - now);
```

* before: 4517 ms
* after: 3651 ms