Announcement

Collapse
No announcement yet.

GCC 9 Compiler Tuning Benchmarks At Various Optimization Levels, Vectorize Options

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

  • #51
    Originally posted by quaz0r View Post
    do those vectorize options that michael used imply march=native ? otherwise how are they generating vector instructions...are they maybe defaulting to some 20 year old sse instructions or something ?
    They do. They work by using SSE2 that is implied on X86-64.

    You would get much better results by atleast enabling SSE4 or AVX2.

    Comment


    • #52
      Originally posted by wagaf View Post

      If you're gonna attack people personally and call their messages "idiotic" and "factually incorrect", at least provide factual evidence to support your claims.

      I never said GCC was perfect. I've encountered bugs in GCC and Clang myself (never filled bugs for them tough).
      However factual evidence I've seen (in programs i've worked on and various benchamarks) shows -O3 IS the best optimization level.

      edit: you mentioned the Linux kernel, it's true that O3 is not appropriate to build the kernel in my experience.
      Where's your evidence? It's the 20th message in this topic where someone claims that -O3 is universally better. Where are the test results? Show me at least three dozens of tests where -O3 always wins.

      Originally posted by F.Ultra View Post

      If that happens (and of course it will happen in a few cases) than it does not mean that "the code was bloated", all it means is that there is a bug in the GCC optimizer for that particular code because the resulting code was _less_ optimized in that case.
      Do you know what the CPU cache is? Do you know how the CPU works? If an application compiled with -O3 contains 30% more ostensibly faster code to run it might run slower because of cache misses and it's more code to run.

      Originally posted by F.Ultra View Post

      The thing is that there was this whole "O3 just makes the code big and bloated so everyone should compile with Os because that is the only one that will make your code actually run faster" "truth" going around some time ago and it have lingered for decades. Not a single person provided any sort of proof back then so it was all assumed.
      I've never said that, idiot. Never. Quote me on this.


      Comment


      • #53
        I'd like to thank hreindl for being one of very few knowledgeable individuals here and supporting me.

        Comment


        • #54
          Originally posted by sa666666 View Post
          Again, too bad you didn't have that attitude when the thread started, and we could have all been spared your vitriol. You have anger issues. And you obviously hate Linux and open-source. Why don't you do yourself and everyone else a favour and go to a forum where you won't get so angry at every little thing. It will really help your blood pressure.
          Why calling out utter people's BS nowadays is called "having anger issues"? And also, could you exactly point me at the messages where I was angry? Oh, I mentioned that someone had said something idiotic? But I was honest and the thing was idiotic. Next you're gonna say that vaccines cause autism and it's your opinion, and I'll just say that you're a bloody idiot because you believe in shit with no evidence. If you don't like my straightforwardness then blacklist me and keep claiming that vaccines cause autism.

          Also go fuck yourself if you believe that I hate Open Source and Linux. I've done more for them than 99.9% of Phoronix readers. I've personally helped solve numerous bugs in the Linux kernel, GCC, KDE and many other open source projects. What have you done other than having a weird nickname on Phoronix?

          Originally posted by sa666666 View Post

          All the more reason that WE NEED BLOCKLISTS WORKING. Please Michael, make this a priority for 2019. These forums are (mostly) good, but there are a few loons here that really make me question whether I should have bought lifetime membership.
          You can always block the people who you deem offensive. Problem solved.
          Last edited by birdie; 13 January 2019, 11:03 AM.

          Comment


          • #55
            Originally posted by coder View Post
            How much blame you can really put on the compiler, for either of these, is a matter of some debate. That said, someone (probably Weasel) will probably language lawyer us about type-punning and how having such impure desires make us not only bad programmers but impugns our morality.
            I don't think it's a matter of debate at all. It's not even the compiler's job. This thing is specified in the language.

            Unless you mean you want the compiler to provide extensions for it, and it does, with the may_alias attribute.

            Comment


            • #56
              Originally posted by pal666 View Post
              nobody hand optimizes single instruction. they optimized whole loop which does many iterations, what will it wait for?
              lol, you obviously have no idea just how long the pipeline is on modern CPUs.

              Comment


              • #57
                Originally posted by pal666 View Post
                there are packages which are broken by strict aliasing which is enabled with -O2 and -Os. fix your packages, don't blame compiler
                No but -O3 inlines more functions so it has the potential to break more stuff with the same options. However those programs are broken already so it's not really the fault of -O3 at all.

                Comment


                • #58
                  Why didn't you test -Ofast ? My laptop is flying ever since I started compiling Mesa with -Ofast a couple of days ago. I know it also might break some stuff in real life situations (although it's rock solid for me), but for testing purposes, it would've been nice to see benchmarks.

                  Comment


                  • #59
                    Why does it always feel like -march=native is an afterthought? It should be included with each -O option

                    Comment


                    • #60
                      Originally posted by FireBurn View Post
                      Why does it always feel like -march=native is an afterthought? It should be included with each -O option
                      And then all packages built on that cool build farm would miserably crash on your laptop, desktop or whatever, should it lack any single instruction set feature build farm had. Sounds exciting, isn't it? Much less so for those building REDISTRIBUTABLE software. So -march=native is ok if you build for yourself, here and now and do not plan to distribute these binaries. Otherwise you'll have it hard when plenty of users would blame you for party crasher release.

                      p.s. I wonder if there're some similar comparisons for GCC7 vs 8 vs 9 or so.
                      Last edited by SystemCrasher; 13 January 2019, 02:15 PM.

                      Comment

                      Working...
                      X