Compiler optimizations usually account for only 10-20% of your program's speed. The rest comes from the programmer.
-
-
Replying to @SasLuca @Jonathan_Blow and
That's definitely true, but on that 10-20%, a superoptimizer can do some pretty amazing things. I'm also doing some research on ways to scale it up a bit further and optimize some more complex things. If it can reason about cache misses, it should be able to optimize them.
1 reply 0 retweets 2 likes -
Replying to @bzogrammer @SasLuca and
In the general case, the limits are mostly a matter of how fast you can find a valid optimization, and whether or not you can prove that it is valid. In terms of the proof part, a general proof system is undecideable, and so humans will sometimes be smarter.
1 reply 0 retweets 1 like -
Replying to @bzogrammer @SasLuca and
However, if a human can't find some axiom that is unavailable to the proof system that suggests a more efficient solution, a superoptimizer should, in theory, have the upper hand due to brute force combinatorics.
1 reply 0 retweets 0 likes -
Replying to @bzogrammer @SasLuca and
Compilers _should_ be much better than humans at producing optimal code. There is no question about that. The problem is that compilers _aren't_ currently. That's basically the whole thing - people seem to think compilers are what they could be, not what they actually are.
2 replies 1 retweet 8 likes -
Replying to @cmuratori @SasLuca and
That would be different if compilers used superoptimization. Superoptimizers frequently beat LLVM and GCC by a factor of 2-5x and human assembly programmers by about 1.5x or so (on average). From my understanding, compiler engineers generally don't like it because the code it
1 reply 0 retweets 0 likes -
Replying to @bzogrammer @cmuratori and
Produces is practically obfuscated. It'll find some bizarre string of esoteric bitwise instructions that does the same thing as your original code, but twice as fast. If you're trying to understand the assembly produced, it's not helpful. So compiler devs generally avoid it.
1 reply 0 retweets 2 likes -
Replying to @bzogrammer @cmuratori and
Is there any real use case of this SO at the moment, or is it still only in the academia unreal world?
1 reply 0 retweets 0 likes -
Replying to @Ivan_Braidi @bzogrammer and
We used custom lite "superoptimizers" at RAD more than once. I believe
@Mike_Sart had a brute force permutation thing that was used on Pixomatic, and I wrote a Metropolis scheduler for the Bink 2 Beta mocomp blend routines on the XBox 360.3 replies 0 retweets 4 likes -
Replying to @cmuratori @Ivan_Braidi and
Speedboy? Blast from the past. Mike wrote about that here: https://www.drdobbs.com/optimizing-pixomatic-for-modern-x86-proc/184405807 …
3 replies 2 retweets 13 likes
SPEEDBOY!!!!!
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.