性能比较-gcc和llvm-gcc [英] performance comparison - gcc and llvm-gcc

查看:390
本文介绍了性能比较-gcc和llvm-gcc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在规格cpu2006基准测试中对hmmer和mcf上的-O3选项比较了gcc和llvm-gcc.令人惊讶的是,我发现这两种情况下gcc都击败了llvm-gcc.是因为-O3的含义不同吗?我应该如何建立实验以获得公平的比较?

I compared gcc and llvm-gcc with -O3 option on hmmer and mcf in spec cpu2006 benchmark. Surprisingly, I found gcc beat llvm-gcc for both cases. Is it because the -O3 has different meanings? How should I establish the experiments to get a fair comparison?

顺便说一句,我只是通过更改makefile中的cc来进行实验.

BTW, I did the experiment by ONLY changing cc in the makefile.

谢谢, 博

推荐答案

您似乎对gcc在基准测试中击败llvm感到惊讶. Phoronix 在此领域提供了许多有趣的基准测试.例如,看看:

You seem surprised that gcc beat llvm on your benchmark. Phoronix hosts a bunch of interesting benchmarks in this area. For instance, have a look at:

  • Benchmarking LLVM & Clang Against GCC 4.5.
  • Compiler Benchmarks Of GCC, LLVM-GCC, DragonEgg, Clang

(很多可爱的颜色.)

我应该如何建立实验以进行公平比较?,大概您应该比较最快的运行时间,最快的编译时间,最低的内存占用,每瓦最大的操作和可扩展性. CPU的数量(您自己付钱,然后选择),以使每个编译器的配置速度都最快,而其他编译器的配置速度最快.

As far as How should I establish the experiments to get a fair comparison? goes, presumably you should compare the fastest runtime, fastest compile time, lowest memory footprint, most operations per Watt and scalability over number of CPUs (you pay your money and take your choice), for the fastest configuration of each compiler against the fastest configuration of the other(s).

首先,您至少需要确定每个程序的可变性-对于平台上单个程序的每次运行,变量的可重复性. (是的,令人信服的基准测试需要您提供全面的信息.)

First off, you need to at least establish the variability of each progam—how repeatable the variables are for each run of a single program on your platform. (Yes, believable benchmarking requires thoroughness on your part.)

这篇关于性能比较-gcc和llvm-gcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆