Assembly's Perspective of C
> If you haven’t been living under a rock quarantined against COVID-19, you’ve probably heard about C becoming assembly 2.0, or the new assembly, or YES THIS.What's this referring to? Has something been proposed recently?> Now, many compilers have done some work with this using what are known as intrinsics. However, these do not allow us to fully exploit what we can in assembly. Most of the intrinsic instructions follow the C calling conventions, so they are required to load from RAM, do something with it, then store back into RAM.> Since we store the intermediate values, we’re exercising the memory controller for every intrinsic. For our assembly, we load at the beginning and store at the very end. Nothing is in between.I don't understand this claim. It seems demonstrably false to me. Intrinsics don't have to follow the C calling convention. And they in practice don't follow it. You can try it for yourself. It definitely doesn't store intermediate results to memory for his example code.In fact, isn't what clang generates roughly the same assembly as the hand-written assembly in the article?https://godbolt.org/z/rfmFB5The author looks like an expert so I guess I'm missing something.