We picked up a Pi 3 at Microcenter today (limit 1 per customer) and decided to repeat the benchmark that we performed on the Pi 2. This benchmark is a simple number cruncher that calculates the first 50 Fibonacci values 1000 times and prints out the average time required to calculate those 50 values. It is strictly a CPU test. The code looks like:
a,b = 1,1
for i in range(n-1):
a,b = b,a+b
start = time.time()
for j in range(N):
for i in range(50):
To run test, we opened four SSH sessions and ran the above code in each session. Just like the Pi 2, you can have up to four threads without a performance hit since there are 4 cores. Here’s what the results looked like this time:
And here are the results from the Pi 2:
We can see from the above that it took the Pi 2 about 1.38 milliseconds to calculate the first 50 Fibonacci numbers. The Pi 3 on the other hand did it in roughly 1.08 milliseconds. That is a speed improvement of about 27.8%. Given that CPU clock has been raised from 900 to 1200 Mhz, these results appear to be pretty much on the mark. So once again, the engineers at RapberryPi.org have raised the bar. And while it’s not the quantum leap that the RPi 2 was, a 27.8% boost in speed along with WiFi and Bluetooth at the same price point as its predecessor is still a great accomplishment.
A couple of final notes, we used the on-board WiFi to connect the Pi 3 and saw no issues with connectivity or thruput. In addition, there have been some reports of the CPU getting very hot during benchmark tests like this but since our was covered with a DAQCplate, we did not have an opportunity to verify this.