yatp icon indicating copy to clipboard operation
yatp copied to clipboard

spawn through local queue if possible

Open sticnarf opened this issue 5 years ago • 0 comments

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

sticnarf avatar Jan 08 '20 04:01 sticnarf