Did they really get such a performance boost (x6) ...
# coroutines
v
Did they really get such a performance boost (x6) over standard coroutine implementation, or was it because of the single-threaded implementation?
v
I’ve carefully analyzed these benchmarks. The first improvement is achieved by narrowing responsibility scope: the channel becomes single-producer/single consumer,
close
and
select
support is dropped. In general, it’s a good idea to write very specialized solutions for high-performance code, but such solutions are rarely useful outside of specific use-case. x6 boost is achieved only because solution became single-threaded. Note: not SP/SC, but single-threaded, producer and consumer should be executed on the same thread. No
volatile
, no barriers, no memory synchronization.
👍 1
v
That's what I expected. Thanks!