| ▲ | jcranmer 5 hours ago | |
Compilers have, for several decades now, stopped viewing optimization in terms of optimizing the instructions of a function and instead viewed it as preserving the semantics under some machine model. Consequently, it's rather important to actually nail down some of the object model semantics to be able to do things like understand which loads and stores actually need to be preserved, and you can't really do that with just library functions. And, FWIW, in a lot of high-performance code, the overhead of a function call may be too high for an atomic operation. | ||