summaryrefslogtreecommitdiff
path: root/ccan/timer/benchmarks
AgeCommit message (Collapse)Author
2014-10-31timer: change timers_expire() to return a single timer.Rusty Russell
The linked list method was problematic, especially if timers delete other expired timers (eg. the next one in the expired list: the timer_del will delete it from expired, but that's a bit unexpected). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-04-05timer: cache the minimal value.Rusty Russell
We spend a lot of time searching for the next timer to expire: by caching the minimum, we can skip most of this work. Even if timers are deleted, the minimum will be a starting point for searching. The expected-usage benchmark has to be increased by a factor of 100, otherwise it's now too short. Before: $ ./expected-usage 1000000 in 12.701647935 After: $ ./expected-usage 1000000 1000000 in 0.061095153 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-04-05timers: implementation of lazily-ordered timers.Rusty Russell
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>