3 ms·
> Starts by saying how it's a huge myth that compilers generate better code than hand-made assembly... It's important to note that I never said this. I was si
by lbrandy 16y ago
> Starts by saying how it's a huge myth that compilers generate better code than hand-made assembly...
It's important to note that I never said this.
I was simply trying to separate two versions of the same rule of thumb... I said that using a compiler, a smart low-level programmer can generate the assembly code he wants. This is not "hand-made" assembly, but this is not just the magic of an optimizing compiler, either.
- ramchip 16y agoI do see your point and I found it interesting (I've had to optimize filters in the past and used the same process of coding C and looking at the assembly), but how can "beating the compiler" be interpreted as anything but writing better code than the compiler?
- Retric 16y agoWriting optimized code generally involves looking at larger sections of the problem / code base and picking a different approach based on global conditions. So, when you and the compiler are booth looking at the same code base, but you find a better local approach based on a global condition you have beaten the compiler. Even if all you did was tell it about that condition.
- deleted 16y ago[deleted]