The idea is from monoio, who copies code of scoped-tls into its own codebase. It reduces time when getting current Runtime.
I also found that the cost of SendWrapper is significant, but it will be addressed by #252 .
The benchmark shows that on Linux, compio is 15% (14% with LTO, and 5% with faster SendWrapper) slower than tokio; on Windows, compio is 5% (18% with LTO) faster than tokio.
scoped-tls
instead of Weak tlsmonoio
, who copies code ofscoped-tls
into its own codebase. It reduces time when getting currentRuntime
.I also found that the cost of
SendWrapper
is significant, but it will be addressed by #252 .The benchmark shows that on Linux, compio is 15% (14% with LTO, and 5% with faster
SendWrapper
) slower than tokio; on Windows, compio is 5% (18% with LTO) faster than tokio.