How do I get started with superoptimization /g/? I hear it's this magic way to make (very short) pieces of code as fast as possible by trying huge numbers of instructions. Is it actually useful or is it just a meme? For example, if I wanted to superoptimize a strlen() function, how long would it take?
actually optimize any concrete program first
>if I wanted to superoptimize a strlen() function, how long would it take?
what the fuck does that mean, superoptimizaiton is a general compliation technique. do you mean how long will it take to compile it?
>>1104 I tried a few superoptimizers. Most of them didn't compile, many of those that did segfaulted, those that didn't segfault generated code that doesn't do what I told it to.
tl;dr it's a gay meme
>(very short) pieces of code
>huge numbers of instructions
The fuck?
Anyway optimizing is a complicated topic.
"Huge number of instructions" may mean, for example, loop unrolling or something.
Also if you're going to write for (((x86))), you have to follow their documentation for maximum optimal code.
How do I get started with superoptimization /g/? I hear it's this magic way to make (very short) pieces of code as fast as possible by trying huge numbers of instructions. Is it actually useful or is it just a meme? For example, if I wanted to superoptimize a strlen() function, how long would it take?