Announcement

Collapse
No announcement yet.

GCC Lands Loop Splitting Optimization

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

  • 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

  • #2
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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.

        Comment


        • #5
          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...

          Comment


          • #6
            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.

            Comment

            Working...
            X