Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|