3 ms·
I don't think you've got this quite right. Spinlocks require memory barriers. C11 atomics are, among other things, a standardized way to implement cross platf
by djcapelis 11y ago
I don't think you've got this quite right. Spinlocks require memory barriers. C11 atomics are, among other things, a standardized way to implement cross platform memory barriers without dropping into platform specific assembly.
- biokoda 11y agoThe only way to test it out is with code. In my own tests spinlocks turned out to provide the highest throughput. I do not care about the problem enough anymore to go try out your implementation. If you implemented a lock free queue, you should be the one testing it out if it actually is better than a simple spinlock.
- deleted 11y ago[deleted]
- djcapelis 11y agoMy code is on github with test harnesses for doing benchmarking on it. Yours is... some files on a hard drive that likely show something completely different than you think it does. I'm sorry, but I don't have time to comment on this thread anymore.