teknoraver icon

arm64 gcc vs clang

teknoraver | PRO | 12/05/20 07:23:15 PM UTC (Edited) | 0 ⭐ | 996 👁️ | Never ⏰ | []
text |

4.31 KB

|

None

|

0 👍

/

0 👎

root@macchiatobin:~/src/benchs# uname -a
Linux macchiatobin 5.9.11-matteo #4 SMP Sat Dec 5 18:23:22 CET 2020 aarch64 GNU/Linux
 root@macchiatobin:~/src/benchs# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/10/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.0-23' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Debian 10.2.0-23) 
 root@macchiatobin:~/src/benchs# clang -v
Debian clang version 11.0.0-5+b1
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/aarch64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/aarch64-linux-gnu/10
Selected GCC installation: /usr/bin/../lib/gcc/aarch64-linux-gnu/10
Candidate multilib: .;@m64
Selected multilib: .;@m64
 root@macchiatobin:~/src/benchs# make run CC=gcc
gcc -pipe -O3 -Wall -mcpu=cortex-a72   -c -o dry.o dry.c
gcc -pipe -O3 -Wall -mcpu=cortex-a72   -c -o dry2.o dry2.c
gcc   dry.o dry2.o   -o dry
gcc -pipe -O3 -Wall -mcpu=cortex-a72    flops.c   -o flops
./dry 2>/dev/null
Dhrystone Benchmark, Version C, Version 2.3
Program compiled without 'register' attribute
Using clock_gettime(), HZ=1000
 Running 1 thread(s)
 Microseconds for one run through Dhrystone:     0.0
Dhrystones per Second:                          20193860
./flops
    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
    Module     Error        RunTime      MFLOPS
                            (usec)
     1      4.0146e-13      0.0080   1749.5981
     2     -1.4166e-13      0.0061   1142.5963
     3      4.7184e-14      0.0074   2287.9728
     4     -1.2546e-13      0.0079   1895.2186
     5     -1.3800e-13      0.0147   1968.2602
     6      3.2374e-13      0.0128   2270.7440
     7     -8.4583e-11      0.0240    499.8896
     8      3.4855e-13      0.0143   2096.9716
    Iterations      =  512000000
   NullTime (usec) =     0.0000
   MFLOPS(1)       =  1366.1866
   MFLOPS(2)       =  1034.9090
   MFLOPS(3)       =  1637.4457
   MFLOPS(4)       =  2145.0981
 root@macchiatobin:~/src/benchs# make run CC=clang
clang -pipe -O3 -Wall -mcpu=cortex-a72   -c -o dry.o dry.c
clang -pipe -O3 -Wall -mcpu=cortex-a72   -c -o dry2.o dry2.c
clang   dry.o dry2.o   -o dry
clang -pipe -O3 -Wall -mcpu=cortex-a72    flops.c   -o flops
./dry 2>/dev/null
Dhrystone Benchmark, Version C, Version 2.3
Program compiled without 'register' attribute
Using clock_gettime(), HZ=1000
 Running 1 thread(s)
 Microseconds for one run through Dhrystone:     0.1
Dhrystones per Second:                          15028554
./flops
    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
    Module     Error        RunTime      MFLOPS
                            (usec)
     1      4.0146e-13      0.0080   1749.5972
     2     -1.4166e-13      0.0065   1076.6778
     3      4.7184e-14      0.0132   1289.9074
     4     -1.2557e-13      0.0130   1152.0730
     5     -1.3800e-13      0.0230   1262.6973
     6      3.2380e-13      0.0207   1400.6490
     7     -8.4583e-11      0.0240    499.8874
     8      3.4867e-13      0.0220   1363.6914
    Iterations      =  512000000
   NullTime (usec) =     0.0000
   MFLOPS(1)       =  1138.1883
   MFLOPS(2)       =   874.0951
   MFLOPS(3)       =  1178.5884
   MFLOPS(4)       =  1320.6963
 

Comments