celluloid/timers — pull request #35 by ioquatix (2014-07-24 03:13:42+00:00)
Title: Performance improvements

`bsearch` wasn't returning all valid timers. It was sufficient but not complete. Using `Array#shift` is bad, O(N) bad... Using `Array#pop` is better, O(1). Don't know why I did this initially. Some how I thought Ruby might be doing something intelligently internally to avoid the O(N) behaviour. Improvement 15,000 e/s to 100,000 e/s, so another order of magnitude :)

A few minor bug fixes, weren't major issues, e.g. not calling `#dup` in `Group#cancel`. Added a spec for verifying the correct time was being passed to the callback (it wasn't, with my update, the correct time).

One issue I considered was whether or not the callback time is useful or not. Because, if we, say, fire off 30 timers in one iteration, and, say, the first timer callback takes 10 seconds to execute, the remaining 29 wouldn't really get much use out of the time that is provided as part of the callback (it'd be 10+ seconds out). Anyway, I've documented this briefly.