Skip to content

nam-cern/benchmark_arch_optimization_flags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmark and assembly analysis gcc/llvm architecture specific optimization

Here I'm testing the differences between gcc/llvm with various optimization flags. Both performance and assembly are analyzed.

  • To build ./build.sh
  • To run ./run.sh
  • To generate the asm ./generate.sh

The following combinations are tested:

  • GCC
  • GCC -O2
  • GCC -O2 -march=native
  • CLANG
  • CLANG -O2
  • CLANG -O2 -march=native

Test configurations

CPU: Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz.
OS: Ubuntu 16-04 kernel 4.18.3 custom compiled.
main: dummy pi calculator.
gcc (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0
clang version 7.0.0 (trunk 338359) (llvm/trunk 338357)

Results

iterations 1000000000 value 3.14159

  • clang time 5.70509s
  • gcc time 9.15563s
  • clang -O2 time 6.0618s
  • gcc -O2 time 5.17978s
  • clang -march=native -O2 time 1.39697s
  • gcc -march=native -O2 time 9.14826s

References

About

I'm testing the differences between gcc/llvm with various optimization flags. Both performance and assembly are analyzed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 57.3%
  • Shell 42.7%