|December 2014 UPDATE: This example uses a single-threaded Python script. I did this test again using a multi-threaded C++ program and documented those results too.
You can see that newer, C++ blog post here:
One of the things I wanted to get a better understanding of, is how slow the Raspberry Pi is, compared to a Banana Pi, compared to something I know – like a PC.
As discussed, a Raspberry PI is a single-core ARM-based processor which has 500MB of RAM and runs at 700MHz, but can be “safely” overclocked to 1GHz. However, from what I’ve read – if you have it in a case, and without a heatsink and fan, there is a decent chance you will cook it. So, just like the warnings tell you, be very cautious about overclocking a Raspberry Pi above 900MHz.
The Banana Pi is a dual-core ARM-based processor which has 1GB of RAM and runs at 800MHz, but can be overclocked, supposedly to 1.2GHz. The BanaPi is the same size, but has a different port layout as the RasPi. It also runs a slightly-different version of Debian Linux, in addition to some other operating systems. Basically, the Banana Pi is the same concept, except with better specs and a slightly higher price ($10-20 more)
As of this writing, the Raspberry Pi B+ are $38 at Amazon, and the Banana Pi’s are around $49 if you can find a place to buy them.
So, I cobbled together and also stole some crude code to calculate prime numbers, in Python:
I ran this testing 10,000 through 30,000 prime numbers, skipping 5,000 in between. Then, I overclocked the Pi, then rebooted, and then ran then again. I also ran these 3 times each and took the average run time from all of the runs. Below is the data in the form of a heat map:
and if you prefer colorful graphs:
Overclocking the Raspberry PI:
Overclocking the Raspberry Pi (via Debian Linux, the “wheezy” version for Pi) – you simply run:
and then navigate the menus:
What this does is simply modify the following file – which you can also do yourself:
sudo nano /boot/config.txt
When you reboot, the overclocking takes affect.
Overclocking the Banana Pi:
Although that same “raspi-config” exists like above, it doesn’t seem to do anything. It did not modify the /boot/config.txt. When I modified the config.txt, that also seemed to do nothing. I would re-run the prime calculator program and get the same results.
When I researched this a little bit, it turns out that there are some manual commands you need to run – but I found TONS of posts about people either cooking their board, having the system freeze or overheat – for anything over 1GHz. It supposedly comes overclocked at 1GHz – so I was not able to successfully overclock the Banana Pi.
In the end, this isn’t particularly helpful. This only tested one core, and it only tested CPU – and not disk I/O. However, it does give you a general sense of how the Pi’s overclocked compare, and how that compares to a regular PC.