timeout
timeout copied to clipboard
Small optimization: remove needless code from internal sched() calls
When we call timeout_sched() internally, sometimes we can be sure that the timeout is in the future. Always, we can be sure that the timeout has its expires field and its timeouts field set correctly, and that it is not currently pending.
(Do not merge this patch without benchmarking to see if it makes a measurable difference. I haven't benchmarked it, and it might well turn out not to actually help in practice.)
This will conflict with #15; I'm happy to help with the merge if you want to take both.
Hm, we'd better be careful here. I just ran the benchmarks over master and all 3 of these branches, and to my surprise they don't show a very large improvement. (I wasn't very careful in my setup, though, so maybe better benchmark run would show results better.)