3 ms·
Where does the speed advantage come from? Is it because LinkedBlockingQueue doesn't spin-wait before giving up and rescheduling the consumer's thread?
by prodigal_erik 10y ago
Where does the speed advantage come from? Is it because LinkedBlockingQueue doesn't spin-wait before giving up and rescheduling the consumer's thread?
- gsubes 10y agoI am wondering about this myself, even SynchronousQueue (where the spin wait was taken from) is slower than Mapped Memory. Though ASpinWait spins a magnitude longer before sleeping, maybe that is the difference. Or the fact that Memory Mapping goes Off-Heap and instantiates no objects during transfer.