Closed notgull closed 1 year ago
Strange; it look like the ZST optimization is faster for the uncontended use case, but appears to be slower in any case involving multiple threads? Maybe it's because of the single contended atomic variable. I'm closing this for now.
This PR adds optimizations for zero-sized types to
ConcurrentQueue
, such that the queue essentially just becomes anAtomicUsize
describing the number of elements in the queue.