Releases: alphadose/ZenQ
Releases · alphadose/ZenQ
Drop-in replacement for channels
By changing the spinning lastCommittedIndex to slot based CAS operations, we gain a lot of performance as compared to channels for the following tested cases:-
- Single Producer Single Consumer (gain of around 94 seconds with input size 6 * 108)
- Multi Producer Single Consumer where NUM_WRITER_GOROUTINES < NUM_CPU_CORES
- Multi Producer Single Consumer where NUM_WRITER_GOROUTINES > NUM_CPU_CORES as illustrated below
Benchmark_Chan_NumWriters1000_InputSize7000000-8 1 1984590667 ns/op 497344 B/op 1817 allocs/op
Benchmark_ZenQ_NumWriters1000_InputSize7000000-8 2 777197480 ns/op 8736 B/op 21 allocs/op