back

by raphlinus·4y ago·view on hn ↗
Yeah, sometimes atomics perform way better than you expect them to. Check out the linkedlist benchmark in my suite, 12.1 G elements/s on AMD 5700 XT using DX12. That's a respectable fraction of raw memory bandwidth. Carrying over intuition from CPU land, you'd expect it to be very slow.

Looking at the ISA[2] you can get a glimpse of the magic that happens under the hood to make that happen. (Note: this test case is slightly simplified from what's in the repo for pedagogical reasons).

[1]: https://github.com/linebender/piet-gpu/blob/master/tests/sha...

[2]: https://shader-playground.timjones.io/da907f46d8bace9e5db7bd...