RPI2 performance comparison using LINPACK
Erik Moe
e.moe at rcn.com
Sat May 16 23:34:12 UTC 2015
I’ve been lurking on this list for a while. I got interested in the discussion about RPI2 performance on FreeBSD and how it compared to Linux. I found this source code for LINPACK and thought it would be good for comparison: http://www.netlib.org/benchmark/linpackc.new <http://www.netlib.org/benchmark/linpackc.new>. I built FreeBSD using crochet and 11.0-CURRENT. For my Linux system I used Raspbian, the 2015-05-05 release. First for the Linux results, I complied LINPACK using “gcc -O3 -o linpack linpack.c -lm”:
Enter array size (q to quit) [200]:
Memory required: 315K.
LINPACK benchmark, Double precision.
Machine precision: 15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:
Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS
----------------------------------------------------
64 0.84 90.48% 3.57% 5.95% 111257.384
128 1.69 90.53% 1.78% 7.69% 112683.761
256 3.38 90.24% 2.66% 7.10% 111966.030
512 6.76 95.27% 1.78% 2.96% 107186.992
1024 13.52 90.31% 2.81% 6.88% 111699.232
Then I ran the same on FreeBSD, using the same options: "cc -O3 -o linpack linpack.c -lm”:
Enter array size (q to quit) [200]:
Memory required: 315K.
LINPACK benchmark, Double precision.
Machine precision: 15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:
Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS
----------------------------------------------------
8 0.70 92.22% 3.33% 4.44% 16352.248
16 1.41 92.78% 2.22% 5.00% 16447.875
32 2.79 92.16% 3.08% 4.76% 16544.627
64 5.59 92.03% 2.80% 5.17% 16593.432
128 11.18 91.75% 2.87% 5.38% 16617.942
Then I recompiled LINPACK for FreeBSD using “cc -O3 -o linpack linpack.c -lm -mfloat-abi=softfp”:
Enter array size (q to quit) [200]:
Memory required: 315K.
LINPACK benchmark, Double precision.
Machine precision: 15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:
Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS
----------------------------------------------------
32 0.60 87.01% 0.00% 12.99% 83957.811
64 1.21 86.45% 4.52% 9.03% 79789.693
128 2.43 89.71% 2.57% 7.72% 78399.628
256 4.85 90.82% 2.74% 6.44% 77455.055
512 9.71 89.86% 3.14% 7.00% 77857.070
1024 19.48 90.53% 3.13% 6.34% 77090.170
Then finally I enabled powerd on FreeBSD and ran LINPACK with the same compile options, “cc -O3 -o linpack linpack.c -lm -mfloat-abi=softfp”:
Enter array size (q to quit) [200]:
Memory required: 315K.
LINPACK benchmark, Double precision.
Machine precision: 15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:
Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS
----------------------------------------------------
64 0.81 95.19% 1.92% 2.88% 111389.571
128 1.62 89.37% 4.83% 5.80% 115388.171
256 3.23 91.06% 2.42% 6.52% 116282.653
512 6.47 89.86% 3.02% 7.13% 117038.717
1024 12.97 90.54% 3.31% 6.14% 115536.294
The FreeBSD results were very similar to Linux as long as it was compiled with "-mfloat-abi=softfp” and the cpu is running at the full 900Mhz. I tried to compile the Linux version of LINPACK using "-mfloat-abi=soft”, but got the error "linpack uses VFP register arguments, /tmp/cc24nslQ.o does not”, so I assume that it doesn’t support a soft floating-point implementation. FreeBSD must default to "-mfloat-abi=soft”. Raspbian must default to "-mfloat-abi=hard” because that’s the only option that would work neither "-mfloat-abi=soft” or -mfloat-abi=softfp” would link. Will hard float work for FreeBSD if I compile with "TARGET_ARCH=armv6hf”?
Erik
More information about the freebsd-arm
mailing list