performance comparison - gcc and llvm-gcc

前端 未结 1 546
无人共我
无人共我 2021-02-06 17:47

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 differe

相关标签:
1条回答
  • 2021-02-06 18:29

    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

    (Lots of luvverly colours.)

    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.)

    0 讨论(0)
提交回复
热议问题