4 ms·
In a prior job I worked as a C programmer, and once I tried to rewrite a few heavily used utility function in assembly. I measured, but it did not run any fas
by krylon 9y ago
In a prior job I worked as a C programmer, and once I tried to rewrite a few heavily used utility function in assembly.
I measured, but it did not run any faster. Damnit, this is assembly, I said, it has to be faster. So I looked at the assembly code generated by the compiler: Turned out it was pretty much identical to the code I had written. At that point, I felt brief surge of pride (because I was as clever as the compiler) and then disappointment (because I was not more clever than the compiler), and I figured trying to be smarter than the compiler was a waste of my time.