timers: dispatch ontimeout callback by array index
authorBen Noordhuis <info@bnoordhuis.nl>
Thu, 15 Aug 2013 17:23:36 +0000 (19:23 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 15 Aug 2013 17:33:34 +0000 (19:33 +0200)
commit0aa13357d67be84ea9021be43497dca7c91cabee
treea894b9cb4d792d10f193c3f09cefb7f579c6aea1
parent7a3f7780dc9eed1391b389dec82849137ac9d5f5
timers: dispatch ontimeout callback by array index

Achieve a minor speed-up by looking up the timeout callback on the timer
object by using an array index rather than a named property.

Gives a performance boost of about 1% on the misc/timers benchmarks.
lib/timers.js
src/timer_wrap.cc