Announcement

Collapse
No announcement yet.

GCC Is Currently Faster Than LLVM's Clang At Compiling The Linux Kernel

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

  • GCC Is Currently Faster Than LLVM's Clang At Compiling The Linux Kernel

    Phoronix: GCC Is Currently Faster Than LLVM's Clang At Compiling The Linux Kernel

    While LLVM's Clang C/C++ compiler was traditionally known for its faster build speeds than GCC, in recent releases of GCC the build speeds have improved and in some areas LLVM/Clang has slowed down with further optimization passes and other work added to its growing code-base. As it stands right now, GCC is faster than Clang at compiling the Linux kernel...

    http://www.phoronix.com/scan.php?pag...l-Builds-Clang

  • #2
    GCC was also faster during that dark period of Clang's first 13 years of life when it could not build the kernel. So pretty much you could say GCC has always been faster than Clang.

    Comment


    • #3
      Originally posted by andyprough View Post
      GCC was also faster during that dark period of Clang's first 13 years of life when it could not build the kernel. So pretty much you could say GCC has always been faster than Clang.
      It doesn't matter. Clang/LLVM is the best of compilers without viral license restricting developers freedom. GCC might be the best, when considering performance only, but GCC won't get adopted by corporate projects.

      Comment


      • #4
        Originally posted by kravemir View Post

        It doesn't matter. Clang/LLVM is the best of compilers without viral license restricting developers freedom. GCC might be the best, when considering performance only, but GCC won't get adopted by corporate projects.
        The GPL secures user freedom, our all freedom so to say, it does not grant you as a developer to trade the user freedom for your own greed. And thats why the GCC will always be far superior to LLVM and that not just due to its architecture.

        Comment


        • #5
          Originally posted by kravemir View Post

          It doesn't matter. Clang/LLVM is the best of compilers without viral license restricting developers freedom. GCC might be the best, when considering performance only, but GCC won't get adopted by corporate projects.
          That's a seriously lopsided view. Of course it matters. They are different. Different is good.
          And I'd say performance is a pretty large chunk of "good" when it comes to compilers.

          Comment


          • #6
            Worth noting that I doubt the LLVM team has ever used the kernel as any sort of benchmark, plus it needed extra functionality for this that may not have been fully optimized...so this isn't terribly surprising.

            Comment


            • #7
              Originally posted by re:fi.64 View Post
              Worth noting that I doubt the LLVM team has ever used the kernel as any sort of benchmark, plus it needed extra functionality for this that may not have been fully optimized...so this isn't terribly surprising.
              Do you have any evidence for the position that the relative compile speed for gcc vs clang would be substantially different on other large C codebases than the Linux kernel?

              Comment


              • #8
                said that in general context a year ago: https://www.youtube.com/watch?v=Z9vtMjNgW1I large cooperate codebase will bloat, one feature creep at a time :-/

                Comment


                • #9
                  Originally posted by re:fi.64 View Post
                  Worth noting that I doubt the LLVM team has ever used the kernel as any sort of benchmark, plus it needed extra functionality for this that may not have been fully optimized...so this isn't terribly surprising.
                  llvm passes has been getting slower in general so I’m not surprised because of that but I don’t think the extensions used by the kernel would play much role. If anything, any new functionality used by the kernel should actually help compile time since the optimizer will more likely leave them alone... the runtime performance is a different story and I’ll be surprised if clang compiled binary is faster than the gcc one.

                  Comment


                  • #10
                    This is a poor comparison made by Google.
                    I propose to build gcc with LTO + PGO as well (I don't know any other application profiling as well as gcc, not weird).
                    https://gcc.gnu.org/install/build.html
                    Code:
                    BUILD_CONFIG=bootstrap-lto make -j72 profiledbootstrap
                    Another 20 years and clang will catch up with gcc.

                    Comment

                    Working...
                    X