Assembly vs C
Re: Assembly vs C
You are being overly pedantic. And you missed my main point. We are already assuming the algorithms are basically identical, and we are assuming the specific case of how GCC compiles code (and not just some random theoretical compiler). But the main point is that the code itself has very little to do with it. The speed of the code is mostly governed by the number of memory accesses that it does, and that the OS has to do to execute the code. Reduce that, and the speed increases a lot. I know from direct observation that you can beat GCC by a factor of two by doing that one thing.