Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nmathewson
Copy link

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

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.)
@nmathewson
Copy link
Author

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

@nmathewson
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant