Lockfree gone wrong

_config.yml

Lockfree is faster. Usually. Unless you do it wrong. And unless you actually measure it to confirm it is faster. And if you measure, sometimes you are surprised.

Here is a typical way to do it wrong1: dumping data into the atomic anytime you can. Because it is lockfree so why worry. But if you do it right, then yes, lockfree is faster.

Written on September 24, 2023