Memory Bandwidth Napkin Math (2020)
forrestthewoods.com
forrestthewoods.com
In Linux at least, a mutex is a plain old struct living in main memory that you "lock" and "unlock" by cmpxchg'ing some fields. It's literally a main memory write, I don't understand how it could have a quarter of the latency of main memory.
How “latency numbers everybody should know” decreased from 1990–2020 - https://news.ycombinator.com/item?id=30546995 - March 2022 (142 comments)
> L1 is slower; 0.5 ns -> 1.5 ns
Why did that happen?