Some atomic operations are compiled to C calls when they could be compiled to one or two instructions, which would be both shorter and faster than a C call. This is the case of Atomic.fetch_and_add, Atomic.incr , and Atomic.decr, but also, as pointed out by @polytypic in a discussion, Atomic.compare_and_set, Atomic.exchange and Atomic.set, when the operand is integer-like.