Announcement

Collapse
No announcement yet.

GCC vs. LLVM Clang Compilers For The Apple M2 On Linux

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

  • GCC vs. LLVM Clang Compilers For The Apple M2 On Linux

    Phoronix: GCC vs. LLVM Clang Compilers For The Apple M2 On Linux

    With the Apple M2 running Asahi Linux you may be wondering whether it's better to use the GCC compiler as is the default on upstream Arch Linux or whether going for LLVM Clang will yield better performance given all the LLVM/Clang usage by AArch64 vendors, including Apple's own Xcode compiler toolchain making use of it. If you are wondering about GCC vs. Clang for building binaries on the Apple M2, here are some benchmarks.

    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
    6.19 kernel, typo or foreshadowing how long until the M2 is fully supported by anything but Mac OS? Fully accelerated graphics are going to take awhile!

    Comment


    • #3
      suggestion: change the color for best performance on those graphs. maybe a green color for the best. in case of nvidia/amd/intel change the color to darker tone or something.

      Comment


      • #4
        Makes you wonder if Apple are keeping some changes to clang for themselves. That is the problem with non-GPL software.

        Comment


        • #5
          Originally posted by carewolf View Post
          Makes you wonder if Apple are keeping some changes to clang for themselves. That is the problem with non-GPL software.
          It can be tested if you have a mac. Just compile a vanilla llvm on macOS and compare the performance against the llvm provided by apple. I would do it myself, if I had a mac...

          Comment


          • #6
            Maybe using -mcpu=natve and lto affects the compilers differently. Such tests would be useful.

            Comment


            • #7
              There's quite a lot of compiler arguments on the graphs that are overriding previous ones. I'm pretty sure -O3 -O2 on GCC would just be -O2 for example

              Comment


              • #8
                Maybe we could get phoronix benchmark battle dance off with steam deck running distrobox ubuntu 2204lts with kde vs apple ?
                different tests like compiling and gl perf ?

                Comment


                • #9
                  Seems like openmp was disabled for clang builds of ncnn… so the results say nothing.

                  Comment


                  • #10
                    Originally posted by carewolf View Post
                    Makes you wonder if Apple are keeping some changes to clang for themselves. That is the problem with non-GPL software.
                    Makes me happy for the contributions they've already given back to LLVM, which benefits both them and all other users.
                    Don't expect much and seldom disappointed.

                    Comment

                    Working...
                    X