If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite
This sort of optimizations probably only benefits select codebases, especially since this kind of problem is actually a "design fault".
Any codebase receiving any significant improvement from this is probably riddled with similar or worse "defects", the only answer is to rewrite it properly. Compiler optimizations are great (for small isolated things), but they can only go so far, and they can never bad code into good code.
I bet this in some cases gives a 4x+ speedup since removing inner-loop conditionals also allows for autovectorization, so the split result is vectorizable, it will give a really good speed-up.
http://www.cppcon.org--Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2014--The trans...
The condition could be hidden in a library function called from the loop and the compiler could decide to inline it.
Or a macro, a template class, an inlined class function, automatically generated code, etc.. We'd all still be writing assembler code and tweaking every single CPU-cycle if we really would think of it as a fault and we wouldn't be getting anywhere.
Comment