timeout icon indicating copy to clipboard operation
timeout copied to clipboard

Small optimization: remove needless code from internal sched() calls

Open nmathewson opened this issue 8 years ago • 2 comments

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.)

nmathewson avatar Mar 05 '16 18:03 nmathewson

This will conflict with #15; I'm happy to help with the merge if you want to take both.

nmathewson avatar Mar 05 '16 18:03 nmathewson

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.)

nmathewson avatar Mar 06 '16 14:03 nmathewson