Wednesday, November 21, 2012

Comparing performance of Raspberry Pi and BeagleBone

Synopsis: ARM v6 CPUs (such as the Raspberry Pi) are significantly slower than ARMv7 CPUs (such as in the BeagleBone) at the same clock speed, at least when running Debian (armhf) on them.

I know it's a rather naive benchmark, but I tried running Perl and Scala programs to find all the prime numbers under 100,000 on both the Raspberry Pi and the BeagleBone.

They're both 700 MHz ARM CPUs, but the Raspberry runs on the older v6 spec CPU.

Surprisingly, this seems to make a huge difference to performance.

Perl primes to 100k:

  • My desktop (3GHz i7) - 3.3 seconds
  • BeagleBone (720 MHz ARMv7)- 68 seconds
  • Raspberry Pi (700 MHz ARMv6) - 125 seconds

I thought I'd try it quickly in Scala, but it seems the JVM isn't very well optimised on ARM yet. I cancelled the tests after five minutes, and re-ran them only calculating up to 10k.

Scala primes to 10k:

  • Desktop - 0.33 s
  • Beagle - 19 s (zero) / 34 s (jamvm)
  • Raspberry - 58 s (jamvm) / 79 s (zero)

It's curious to note that the best JVM varies between the architectures; Zero was a lot faster than JamVM on the Beagle, but it was a lot slower on Raspberry Pi. (At least for this naive test)
Zero is the default on both, at least on Debian.


  1. Toby,

    I see you have been busy playing around with the rPI. Did you move on from the mk802?

  2. The mk802 was requiring a lot of effort for little gain, and some other teams working on it seem to be making better progress.
    I'll probably put out another images for it at some point in the future, once the video and 3d drivers settle down, if no-one else does.

  3. I totally understand. However, Your image was the best one I could find. I was unable to find any other groups working on it. It was also difficult to find much information on the LIMA project. I saw some code commits, but I was not sure how much had been done.

    Have you checked out the new MK802 III? It uses the RK3066 processor, so its not the most friendly with linux, but I did see there are some out there making progress with it.

  4. That's the thing -- by the time we really get anywhere with the variant of the Allwinner chips in the MK802, it'll be out of date and forgotten.
    We need the manufacturers to provide more source code.

  5. Check Out ODROID-u2


  6. This comment has been removed by the author.

  7. According to Oracle
    their JVM is better. Have you tried it?

    1. Last time I checked, last year, Oracle didn't haven't a version of their JVM using the appropriate architecture for the Raspberry Pi or BeagleBone.

      I'm trying to download it now but am having to fight with Oracle's license agreements and sign-up requirements. I'll give it a go another time.

      The Java performance on both was so abysmally slow compared to C that I gave up trying to do development on the JVM there. I'd be quite happy if performance picks up, but even according to that blog, the Oracle JDK performance was only a bit faster, not a lot faster.

  8. I had some pleasing experience with the RPi after doing the Oracle Java MOOC in 2014. I wonder if you managed to download the software from Oracle...

    1. I have since used the Oracle JDK version 8 for the BeagleBone Black.. I should go back and check about it for the Raspberry Pi, since I believe it's available for that too.