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.