cats-effect icon indicating copy to clipboard operation
cats-effect copied to clipboard

Remove TODO in `IOFiber.readBarrier()`

Open qxrein opened this issue 7 months ago • 3 comments
trafficstars

#4320 benchmark reference:

withBarrier (volatile)   : ~5.2M ops/s  
withoutBarrier (plain)   : ~5.3M ops/s  (unsafe for fibers)  
javaFullFence            : ~800K ops/s  (overkill)  

optimizing further makes no sense because VarHandle/Unsafe will introduce complexity for negligible gain. Plain reads break correctness. Volatile is just perfect.

qxrein avatar Mar 25 '25 18:03 qxrein