I need to compare performance of 2 processors and I concluded I should benchmark then with several various tests.
I’m currently using
- linpack (HPL) (because it’s still well known and used for example to build top 500 list)
- SciMark2 (because of 5 different methods inside)
- simple for loops written in C (to see difference between simple instructions / more sophisticated calculations)
Compiling them I saw huuge difference in performance if they are compiled with some *FLAGS (-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong –param=ssp-buffer-size=4).
Should I be using these optimization flags or not to get my point?
I’m afraid I’m loosing some point / differ benchmarks between architectures when optimizing.
Should I be using these optimization flags or not to get my point?
What is exactly your point? It really depends on what you want to prove and even if you try to make an honest comparison, people know all benchmark should be taken with some grains of salt.
Some examples:
- linpack test won’t be comparable to top 500 list because they run the jobs on GPU, not CPU, and the result is FLOPS. Is FLOPS what you’re after?
- do the CPUs have same cache size? There are ways to exploit this difference
- simple loops written in C might not show difference in CPU-memory bus speeds.
In any case, usually every test is run in tuned environment to get maximum performance. What tunings used can be different as long as there’s a proper disclosure about them. If they’re only tuned to what linux is compiled with, someone might dispute that different results can be achieved using different set of parameters.
SPEC CPU is probably what you after. It consists of integer and floating point suites. It’s not cheap, probably why GeekBench is more popular these days (not free, but still cheap). I certainly wouldn’t want to read too much into other benchmarks results.
1
You should use the compilation options you would use when actually compiling the programs that this benchmark is standing for. Computation-intensive programs are usually compiled with optimization (unless you are researching the efficacy of optimization), and so the benchmarks should be compiled with optimization.
1