Announcement

Collapse
No announcement yet.

GCC 4.8 Release Brings Improved C++11, Optimizations

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

  • #16
    Not sure about compiler adding it, but I have gotten a 10% increase in throughput by adding select few __builtin_prefetch's in my code manually.

    Comment


    • #17
      Originally posted by ryao View Post
      Originally posted by chithanh View Post
      you can build several code paths and switch at runtime between them.
      As far as I know, GCC does not support that. ICC does though.
      mplayer for example supports runtime CPU detection even with gcc. It is less optimal than building for a specific CPU but still.

      Comment


      • #18
        Originally posted by ryao View Post
        I think it is hypothetically possible that the GCC authors might create an optimization pass that uses prefetchw in a useful way at some point in the future. However, I have no example code. If any such code existed, I imagine that Intel would use it to improve the design of their next chip. That is the fate of all such microarchitecture-specific optimizations.
        That code already exists. Remember AMD chips has had a prefetch instruction since K6, and so has most non-x86 architectures. This is not new stuff, it is only new for Intel CPU.

        Comment

        Working...
        X