Announcement

Collapse
No announcement yet.

GCC Lands Loop Splitting Optimization

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sdack
    replied
    Originally posted by atomsymbol
    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.

    Leave a comment:


  • Azpegath
    replied
    I recommend watching the talk on Data-Oriented Design by Mike Acton from CppCon a couple of years back.

    http://www.cppcon.org--Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2014--The trans...

    Leave a comment:


  • carewolf
    replied
    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.

    Leave a comment:


  • bug77
    replied
    Originally posted by efikkan View Post
    This sort of optimizations probably only benefits select codebases, especially since this kind of problem is actually a "design fault".
    True, but like any other tool that holds your hand, it's better to have it and not need it than the other way around.

    Leave a comment:


  • efikkan
    replied
    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.

    Leave a comment:


  • phoronix
    started a topic GCC Lands Loop Splitting Optimization

    GCC Lands Loop Splitting Optimization

    Phoronix: GCC Lands Loop Splitting Optimization

    The latest GCC 7 development code has an optimization pass now for loop splitting...

    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
Working...
X