C 编译器优化的基准
Benchmarks for C compiler optimization
比较各种 C 编译器的优化器 C 的标准基准是什么?
我对 ARM 的基准测试(或那些可以移植到 ARM 的基准测试)特别感兴趣。
https://en.wikipedia.org/wiki/SPECint主要是用C语言编写的,是真实硬件的行业标准基准,computer-architecture理论研究(例如较大的ROB或模拟中的一些缓存差异CPU ),并供编译器开发人员测试更改 code-gen.
的建议补丁
SPECfp (https://en.wikipedia.org/wiki/SPECfp) 的 C 部分也是不错的选择。或者对于编译器 back-end 优化器,front-end 语言的选择不是很重要。 Fortran 程序也很好。
相关:Tricks of a Spec master 是一篇涵盖不同基准测试的论文。也许最初来自会议。
In this lightning round talk, I will
cover at a high level the performance characteristics of
these benchmarks in terms of optimizations that GCC
does. For example, some benchmarks are classic floating point applications and benefit from SIMD (single instruction multiple data) instructions, while other benchmarks don’t.
维基百科已过时。 SPECint/fp 2017 来的时间很长,但它是在 2017 年发布的,比 2006 年有了很大的改进。例如一些基准测试通过巧妙的编译器优化(如循环反转)变得微不足道。 (多年来,一些编译器基本上添加了 pattern-recognition 来优化 libquantum 中的循环,但它们通常不能总是对其他循环这样做,即使它是安全的。显然它也可以很容易 auto-parallelized.)
为了测试编译器,您实际上可能想要 积极优化可以在其中找到主要简化的代码,因此 SPECcpu 2006 是一个不错的选择。请注意 libquantum 的问题。
https://www.anandtech.com/show/10353/investigating-cavium-thunderx-48-arm-cores/12 将 gcc 描述为 "does not try to " 打破“基准测试 (libquantum...)” 的编译器。但是像 ICC 和 SunCC 这样的编译器 CPU 供应商使用/用于他们自己的硬件(英特尔 x86 和 Sun UltraSPARC 以及后来的 x86)的 SPEC 提交在 SPEC 基准测试上尽可能积极。
SPEC 结果提交需要包括编译器版本和使用的选项(以及 OS 调整选项),因此您可以复制它们。
比较各种 C 编译器的优化器 C 的标准基准是什么?
我对 ARM 的基准测试(或那些可以移植到 ARM 的基准测试)特别感兴趣。
https://en.wikipedia.org/wiki/SPECint主要是用C语言编写的,是真实硬件的行业标准基准,computer-architecture理论研究(例如较大的ROB或模拟中的一些缓存差异CPU ),并供编译器开发人员测试更改 code-gen.
的建议补丁SPECfp (https://en.wikipedia.org/wiki/SPECfp) 的 C 部分也是不错的选择。或者对于编译器 back-end 优化器,front-end 语言的选择不是很重要。 Fortran 程序也很好。
相关:Tricks of a Spec master 是一篇涵盖不同基准测试的论文。也许最初来自会议。
In this lightning round talk, I will cover at a high level the performance characteristics of these benchmarks in terms of optimizations that GCC does. For example, some benchmarks are classic floating point applications and benefit from SIMD (single instruction multiple data) instructions, while other benchmarks don’t.
维基百科已过时。 SPECint/fp 2017 来的时间很长,但它是在 2017 年发布的,比 2006 年有了很大的改进。例如一些基准测试通过巧妙的编译器优化(如循环反转)变得微不足道。 (多年来,一些编译器基本上添加了 pattern-recognition 来优化 libquantum 中的循环,但它们通常不能总是对其他循环这样做,即使它是安全的。显然它也可以很容易 auto-parallelized.)
为了测试编译器,您实际上可能想要 积极优化可以在其中找到主要简化的代码,因此 SPECcpu 2006 是一个不错的选择。请注意 libquantum 的问题。
https://www.anandtech.com/show/10353/investigating-cavium-thunderx-48-arm-cores/12 将 gcc 描述为 "does not try to " 打破“基准测试 (libquantum...)” 的编译器。但是像 ICC 和 SunCC 这样的编译器 CPU 供应商使用/用于他们自己的硬件(英特尔 x86 和 Sun UltraSPARC 以及后来的 x86)的 SPEC 提交在 SPEC 基准测试上尽可能积极。
SPEC 结果提交需要包括编译器版本和使用的选项(以及 OS 调整选项),因此您可以复制它们。