Dug up this historic example from glibc of why optimizing compilers are a necessary mitigation against hideous code: https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strstr.c;hb=0ecb606cb6cf65de1d9fc8a919bceb4be476c602 …
My point isn't to poke fun at the code, but that this kind of coding is the necessary evolutionary endgame with non-optimizing compilers.
-
-
You end up stuck in local extrema ("fast" ver of quadratic algo) b/c nobody's qualified to rewrite the linear-time one in "high-level asm".
-
And you end up with code that's impossible to debug/verify/audit because it's not even obvious what it's doing.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.