32- or 64-bit: Speed

Below are the execution times (or speeds) of various benchmark code from this site run on Raspbian (32 bit), and Ubuntu 20.04LTS (both 32 and 64 bit).

BenchmarkRaspbianU20.04U20.04 32bit
linpack.py 3790MFLOPS4490MFLOPS3000MFLOPS
linpack.py 5000 6550MFLOPS8500MFLOPS6050MFLOPS
ditto, single core 2440MFLOPS4200MFLOPS2400MFLOPS
stream 5560MB/s 5200MB/s5200MB/s
stream_mp3770MB/s 3500MB/s3550MB/s
mersenne_fast.py 19.0s 7.4s20.4s
logistic_v2.py 22.1s 26.0s22.1s
mandel_v2.py 37.4s 34.5s 40.5s
primes_v4.py 20.2s 13.5s17.0s
primes.c 1.4s 1.0s 1.8s
seriesA_hp.py 37.3s3.2s 37.2s
sums.c 2.2s 2.2s 2.2s


The Linpack results use the version of OpenBLAS supplied by the OS.

gas.py uses the three-atom simulation (change if (False): to if (True):, circa line 170).


The python benchmarks which use very long integers (mersenne_fast and seriesA_hp) run significantly faster on the 64 bit OS than on the 32 bit ones. This is expected, as python breaks the very long integers down into half as many "digits" on the 64 bit machines, making additions about twice as fast, and multiplications about three to four times as fast. For mersenne_fast the speed-up is within the expected range. For seriesA_hp it is not, which means there must be some other effect.

Most of the benchmarks which do not use integers longer than 32 bits do not show very much speed difference between the 32 and 64 bit OSes. In several cases the random fluctuations in timings may be more significant. The exception is the Linpack benchmark.

My conclusion, therefore, is that should Raspbian move to being 64-bit, most applications will see a minor speed change, no more than one normally expected between different revisions and different revisions of compiler. But a few will see significant improvements.

(In January 2022 a non-beta 64-bit version of Raspberry Pi OS appeared. It was based on Debian 11, rather than the Debian 10 of the previous 32-bit version. Compiler and library improvements will have helped performance too.)

A more comprehensive comparison of benchmarks on 32- and 64-bit performance on a Pi400 has been published by Phoronix.