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

spawn through local queue if possible #29

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sticnarf
Copy link
Contributor

@sticnarf sticnarf commented Jan 8, 2020

In this PR, if spawn happens in tne working threads, tasks are pushed into the local queue for locality. It also removes the local wake mechanism of futures. Remote is renamed to Handle for its new meaning.

Benchmark shows up to 100% improvement on chain_spawn.
But there is a regression on ping_pong when ping_count is large. This is because it is much more expensive to increase the capacity of crossbeam Worker (allocating new buffer and copying all) than Injector (just adding a new block).

Signed-off-by: Yilin Chen <[email protected]>
Signed-off-by: Yilin Chen <[email protected]>
Signed-off-by: Yilin Chen <[email protected]>
Signed-off-by: Yilin Chen <[email protected]>
src/pool/builder.rs Outdated Show resolved Hide resolved
src/pool/spawn.rs Outdated Show resolved Hide resolved
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.

2 participants