joyent/node — pull request #4392 by tricknotes (2012-12-10 04:45:51+00:00)
Title: events: Use null assignment instead of deleting property

There is the following difference between the way of removing listeners.

* `removeLisner` use deleting property
* https://github.com/joyent/node/blob/master/lib/events.js#L229
* https://github.com/joyent/node/blob/master/lib/events.js#L237
* `removeAllListeners` use null assignment
* https://github.com/joyent/node/blob/master/lib/events.js#L255
* https://github.com/joyent/node/blob/master/lib/events.js#L280
I think this difference has no particular meaning.

So, I modified to use null assignment because it is faster than deleting property.

----

benchmark: https://gist.github.com/4238204
```
null assignment(`obj[key] = null`):
94 ms
deleting property(`delete obj[key]`):
4274 ms
```

This PR is from #4390