4 ms·
real people don't write "compare-and-swap" ... or "lo-and-behold" for that matter. edit. Clearly the joke about "lo-and-behold" didn't land well with the bots.
by 8by3 23d ago
real people don't write "compare-and-swap" ... or "lo-and-behold" for that matter.
edit. Clearly the joke about "lo-and-behold" didn't land well with the bots...
- ninjaoxygen 23d agoPeople who grew up with assembly language or locking primitives are fairly likely to use compare-and-swap because it's literally the commonly understood term for it. https://en.wikipedia.org/wiki/Compare-and-swap https://en.wikipedia.org/wiki/Compare-and-swap
- 8by3 23d agoTIL, thanks for the context. What I was getting at still stands, LLM's seem to love a lot of words-with-hyphens which might be grammatically correct, but I've never seen a human actually type.
- BenoitP 23d agoCompare-and-swap is a hardware instruction, and beyond that a desirable pattern for dealing with concurrent writes. CMPXCHG https://www.felixcloutier.com/x86/cmpxchg https://www.felixcloutier.com/x86/cmpxchg https://lwn.net/Articles/847973/ https://lwn.net/Articles/847973/
- lelanthran 23d agoI do. For compare-and-swap I have even got a lock less queue that I implemented with it.