Everyone says they don’t need compiler optimizations because they’re a good programmer, but nobody actually wants to compile with -O0.
-
-
Replying to @pcwalton
That's so backwards. That you're a good programmer is precisely the reason you DO need optimizations.
1 reply 4 retweets 23 likes -
Replying to @RichFelker @pcwalton
Bad programmers who write unrolled spaghetti C that looks like asm can usually get away with minimal or no optimization. Programmers who write clean high-level code need optimization. Optimization de-incentivizes bad code.
1 reply 9 retweets 37 likes -
Replying to @RichFelker @pcwalton
so much shitty C wouldn't exist if people could have trusted the optimizer in 1988
2 replies 1 retweet 26 likes -
Replying to @johnregehr @pcwalton
Have you ever read the old glibc strstr? :-)
1 reply 0 retweets 6 likes -
-
-
-
Replying to @pcwalton @johnregehr
For your enjoyment: https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strstr.c;hb=9d13fb2413921c713f83efe331e8e4d219c62c6b …
5 replies 4 retweets 32 likes
Its the naive quadratic algorithm, with all the branches tweaked for some particular version of gcc and particular cpu. Which ones, history has forgotten.
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.