Nothing to do with Gambit, but I thought I’d compare a Raspberry Pi 2 B (RPi2B) with a RPi3B using the linpack double-precision benchmark.
On Rpi2B compiled with
gcc -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -o linpackc_new linpackc_new.c
I get
cutie-pi:~> ./linpackc_new Enter array size (q to quit) [200]: 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.67 88.31% 2.85% 8.84% 143587.934 128 1.34 88.31% 2.85% 8.84% 143539.628 256 2.69 88.26% 2.88% 8.86% 143610.046 512 5.35 88.28% 2.86% 8.86% 144172.103 1024 10.70 88.28% 2.86% 8.85% 144153.024
Enter array size (q to quit) [200]: 1000 Memory required: 7824K.
LINPACK benchmark, Double precision. Machine precision: 15 digits. Array size 1000 X 1000. Average rolled and unrolled performance:
Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS ---------------------------------------------------- 1 1.62 96.95% 0.59% 2.46% 106370.268 2 3.17 97.78% 0.60% 1.62% 107598.577 4 6.37 97.78% 0.60% 1.61% 107021.647 8 12.70 97.78% 0.60% 1.62% 107340.380
On RPi3 compiled with
gcc -Ofast -mcpu=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -o linpackc linpackc_new.c
I get
sweety-pi:~> ./linpackc 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.53 89.82% 2.83% 7.36% 178548.817 128 1.06 89.81% 2.83% 7.37% 178628.648 256 2.13 89.81% 2.82% 7.37% 178550.449 512 4.25 89.81% 2.82% 7.36% 178541.926 1024 8.50 89.81% 2.83% 7.37% 178647.415 2048 17.00 89.81% 2.83% 7.37% 178647.687
Enter array size (q to quit) [200]: 1000 Memory required: 7824K.
LINPACK benchmark, Double precision. Machine precision: 15 digits. Array size 1000 X 1000. Average rolled and unrolled performance:
Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS ---------------------------------------------------- 1 1.02 97.47% 0.61% 1.92% 167558.926 2 2.08 97.42% 0.73% 1.84% 164153.213 4 4.06 97.87% 0.61% 1.52% 167576.385 8 8.13 97.87% 0.61% 1.52% 167558.026 16 16.26 97.87% 0.61% 1.52% 167568.545
Enter array size (q to quit) [200]: q
Both compilers are
sweety-pi:~> gcc --version gcc (Raspbian 4.9.2-10) 4.9.2
This page:
https://www.raspberrypi.org/magpi/raspberry-pi-3-specs-benchmarks/
says of the Rpi3 "the Broadcom BCM2837 system-on-chip (SoC) includes four high-performance ARM Cortex-A53 processing cores running at 1.2GHz with 32kB Level 1 and 512kB Level 2 cache memory, a VideoCore IV graphics processor, and is linked to a 1GB LPDDR2 memory module on the rear of the board.” It also says the RAM runs at 900MHz.
It’s funny, but I can’t find a definitive answer about how much cache the RPi2B has, or what the memory speed is.
At any rate, the ratio of KFLOPS for the “small” (200 x 200) problem is 1.243 and the ratio of KFLOPS for the “large” (1000 x 1000) problem is 1.575.
So the RPi3B must have a much more efficient memory system than the RPi2B.
Brad
Afficher les réponses par date
It appears that the pi benchmark in CLN, which uses GMP, uses exactly the same algorithm as chud2.scm, which has been posted here before.
So it’s possible to compare GMP bignum performance with Gambit bignum performance rather directly on both the RPi2B and the RPi3B. Both programs convert the final answer to a string.
On my Raspberry Pi 3 B:
CLN pi with GMP:
sweety-pi:/proc> time pi 1000000 > /dev/null 15.430u 0.130s 0:15.56 100.0% 0+0k 0+0io 0pf+0w
Gambit, configured with:
sweety-pi:~> gsc -v v4.8.4 20160308184356 armv7l-unknown-linux-gnueabihf "./configure 'CC=gcc -mcpu=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard' '--enable-single-host' '--enable-shared' '--enable-multiple-versions'"
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 55.45.
On my Raspberry Pi 2 B
CLN pi with GMP:
cutie-pi:~> time pi 1000000 > /dev/null 25.560u 0.160s 0:25.75 99.8% 0+0k 0+0io 0pf+0w
Gambit, configured with:
cutie-pi:~> gsc -v v4.8.4 20160308184356 armv7l-unknown-linux-gnueabihf "./configure 'CC=gcc -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard' '--enable-single-host' '--enable-shared' '--enable-multiple-versions' '--disable-gnu-gcc-no-strict-aliasing'"
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 105.64.