Raspberry Pi CPU Benchmarks

The following is a collection of CPU benchmarks for Raspberry Pi models 1 through 5. Benchmarks are included that are useful for comparing the performance of the Pi with historical/retro machines such as old PCs and supercomputers as well as contemporary machines.

Sysbench

Sysbench is a benchmarking program that is currently often available in most major Linux repos and is shown here because it is easy to install and run on a modern system. To test the CPUs it repeatedly calculates all prime numbers up to a limit (in this case 10,000). The result is expressed in events/s which is the number of times it managed to calculate the primes per second.

Sysbench version 1.0.20 was used in these tests. Results are computed at 1 core and 4 cores. Most Raspberry Pis have 4 cores except the original. The following command lines were used for 1 and 4 cores respectively:

sysbench cpu --threads=1 --time=60 run
sysbench cpu --threads=4 --time=60 run

The results are as follows:

Pi version Single Core (Events/s) 4 Cores (Events/s)
Raspberry Pi 1 24.30 N/A
Raspberry Pi 2 39.52 157.80
Raspberry Pi 3+ 687.45 2459.22
Raspberry Pi 4 1477.83 5900.85
Raspberry Pi 5 2737.49 10945.45

Linpack Benchmark

The Linpack benchmark solves systems of linear equations using matrices. This kind of computation is commonly used for problems in scientific computing and engineering but it is also highly relevant to less esoteric matters such as 3D games and AI.

Linpack produces a number in MFLOPS (Mega-FLOPS) or millions of floating point operations per second. It is a particularly interesting benchmark because comparable results can be found for many historical computers stretching back to the early 1980s. So if you want to a compare the performance of a Raspberry Pi to a classic supercomputer, this benchmark will come in handy. The popular Top 500 list of supercomputers ranks machines using a related benchmark called HPL or High-Performance Linpack.

These tests have been performed using a C version of the Linpack benchmark (linpack.c) written by MJ Rutter which is available here. It calls out to an algebra library to do the bulk of the computation. The OpenBLAS (Basic Linear Algebra Subprograms) library at v0.3.21 was selected for this purpose which can split computations across multiple CPU cores. The majority of Raspberry Pis have 4 cores except the original which has one. OpenBLAS may be a fraction faster than LAPACK which is the original reference implementation written in Fortran that is more likely to be used in historical results.

In this test computations are performed on the ARM CPUs only and use all the available cores. When comparing these numbers against other modern systems be aware a GPU could be in use in the system you are comparing against. A GPU is well suited to this specific calculation and will produce dramatically faster results, at least 10x or more over the CPU. The Pi does have a modest GPU and it would be interesting if this could be included in a future test.

The benchmark is computed at varying matrix sizes denoted by n=X in the results. This is because the size of the computation that is possible depends on the amount of memory available in the machine. The oldest computers for which comparisons are available did not always have sufficient RAM to run larger matrices. However, lower settings cause efficiency problems with modern computers therefore larger matrix sizes are shown as well. The later Raspberry Pis also have more memory than the earlier ones and so can handle larger matrices. The Raspberry Pi 1 with only 256MB had insufficient memory to run many of the tests. Most of the Pis had 1GB but the Pi 5 has 8GB.

The script reports whole MFLOPs only and each result is an average of 3 runs, which is why the results tend to fall on a 1/3 boundary.

Pi Version Cores Used n=100 n=1000 n=2000 n=5000 n=10000 n=20000
Raspberry Pi 1 1 100.67 167.00 N/A N/A N/A N/A
Raspberry Pi 2 4 150.00 1164.33 1276.00 1378.67 N/A N/A
Raspberry Pi 3+ 4 289.67 3208.00 4099.00 5488.67 N/A N/A
Raspberry Pi 4 4 376.67 8023.00 10507.33 12852.67 N/A N/A
Raspberry Pi 5 4 2364.67 20396.33 24672.33 30199.67 33619.67 37106.67

Hence, a Raspberry Pi 5 can peak at over 37 GigaFLOPS on this test.

Dhrystones and Whetstones

Dhrystones and Whetstones are long standing benchmarks that were often reported by benchmarking programs for 80s and 90s PCs amongst other home computers, which may help when trying to make comparisons between Raspberry Pis and historical machines.

The Whetstone test runs a series of operations such as addition, multiplication, and functions like sine, cosine, square root, exponentiation, and logarithms. The operations are run in proportion to ratios of instructions that were encountered in real programs running on a 1970s computer. Whetstone includes floating point arithmetic tests.

Dhrystone tests principally measure string and integer operations and do not incorporate any floating point arithmetic. The tests are meant to be more indicative of general purpose computing as opposed to Whetstone which is more aimed at measuring scientific computing performance. There is more than one version of Dhrystone and these tests are v2.1. Dhrystone is a pun on the name Whetstone.

The Dhrystone and Whetstone tests used here were written by Roy Longbottom and precompiled ARM binaries were used from Roy's site. Roy supplied versions for ARM6, and ARM7 and the relevant versions were used in each test for the RPi 1 and 2. For Raspberry Pi 3+, 4 and 5, the binaries were built from source as it wasn't clear if they were optimised for the ARM v8s on these newer Pis.

I've noticed my Whetstone benchmark for the original Raspberry Pi is higher than Roy gets (my Dhrystone result is similar). My Pi 1 Whetstone result is close to the figure Roy got when overclocking but the Pi is definitely set to the stock frequency of 700Mhz. The Whetstone rating is a composite of several tests. I have noticed I get similar figures to Roy for most of the tests except on the "N8 exp,sqrt" test where I get a very considerably higher number of MOPS and a slighter better figure for the "N5 sin,cos" test. That appears to be what has skewed it upwards. I am conducting the test several years later than Roy did (in 2025) with a newer operating system (bookworm) and I wonder if some underlying library that the test relies on has subsequently been improved and optimised.

For the purposes of comparison, Roy also has a large number of historical test results available on his site including:

  • An Intel 486 DX2 at 66Mhz can do about 15.3 MWIPS and has a Dhrystone 2.1 VAX MIPS Rating of 35.3
  • An Intel Pentium original at 75Mhz can do about 48.2 MWIPS with a Dhrystone 2.1 VAX MIPS Rating of 87.1

The "VAX MIPS rating" is an alternative way Dhrystones were presented and is simply (Dhrystones/s)/1757, which apparently gives how many times faster the machine is than a DEC VAX 11/780 mini-computer.

Note: these are single core results. A multi-core test was not available however it may be reasonably assumed that a Pi with 4 cores may operate at somewhere up to 4x the stated performance. When tested, running 4x instances of either the Dhrystone or Whetstone tests simultaneously on a 4-core Pi didn't noticably affect the results so this is likely a reasonable approach. So e.g. accounting for 4 cores on a Raspberry Pi 5 it might be assumed the Dhrystone result is 933x faster than an Intel Pentium 75Mhz i.e. (20306.77*4)/87.1 since the Pentium was single core.

Pi Version Cores Used Dhrystones/s (2.1) Whetstones (MWIPS) Dhrystone 2.1 VAX MIPS Rating
Raspberry Pi 1 1 1497265 386.865 852.17
Raspberry Pi 2 1 2934856 689.272 1670.38
Raspberry Pi 3+ 1 7329915 1856.148 4171.84
Raspberry Pi 4 1 15765986 2585.621 8973.24
Raspberry Pi 5 1 35678987 6556.819 20306.77

Gzip

The above are all synthetic benchmarks. This test aims to show the performance of the Pi running a real program with practical application.

This test compresses a file of exactly 100MB in size using gzip at the maximum compression setting of -9. The text was 100MB of Wikipedia. The test was pre-run twice before measurements were taken to ensure the file reached the Linux buffer caches and was not limited by the loading speed from the SD card. The output of the compression was piped to /dev/null to again ensure that the SD card was not the limitation.

Two results are shown. In the first test one 100MB file is compressed on one core. In the second column 4x copies of the identical 100MB file are compressed simultaneously. As the Pi 1 only has one core, these are all running on the same core and on the other Pis they are running on separate cores. The time for the operation to complete is shown in seconds, so lower is better.

Pi Version One File (s) 4x Files (s)
Raspberry Pi 1 166.28 695.811
Raspberry Pi 2 43.901 62.508
Raspberry Pi 3+ 24.769 33.801
Raspberry Pi 4 17.501 20.152
Raspberry Pi 5 6.150 6.145

Pi Specifications

Raspberry Pis often come in several revisions. The below table shows the exact versions of each Raspberry Pi used in the tests:

Pi Version Revision CPU Speed CPU Part No. ARM Type Architecture Cores RAM OS Type OS Version
Raspberry Pi 1 Model B Rev 1 700Mhz BCM2835 ARM1176JZF-S ARMv6 1 256MB 32-bit bookworm
Raspberry Pi 2 Model B v1.1 900Mhz BCM2836 Cortex-A7 ARMv7-A 4 1GB 32-bit bookworm
Raspberry Pi 3+ Model B Plus Rev 1.3 1.4Ghz BCM2837 Cortex-A53 ARMv8-A 4 1GB 64-bit bookworm
Raspberry Pi 4 Model B Rev 1.1 1.5Ghz BCM2711 Cortex-A72 ARMv8-A 4 1GB 64-bit bookworm
Raspberry Pi 5 Model B Rev 1.0 2.4Ghz BCM2712 Cortex-A76 ARMv8.2-A 4 8GB 64-bit bookworm