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

Written by Michael Larabel in Software on 1 September 2022. Page 4 of 4. 12 Comments

Obviously there are other considerations to make too in the compiler selection beyond just the speed of the resulting binary... Support for sanitizers, various debugging options, speed of builds, compiler hardening options / security, the quality of warning/error messages, the size of the resulting binaries, and much more should also be considered when choosing between GCC and Clang for building production/release binaries.

Both the GCC and Clang compilers did have strong leads in different areas depending upon which codebases/applications you are using the most or interested in maximizing the performance potential.

If taking the geometric mean of all the benchmarks, GCC 12 was nearly 7% faster than Clang 14 for these tests on the Apple M2 MacBook Air running Asahi Linux.

Those interested in all the numbers in full can see this result page for all the details.

If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal tips are also graciously accepted. Thanks for your support.


Related Articles
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via TwitterLinkedIn,> or contacted via MichaelLarabel.com.