Benchmarking the Raspberry-Pi

This is a crude and simple PI test against the Raspberry-Pi and a Dell Pentuim-4 (3.0Ghz)

The Raspberry-Pi
Starting PI…
x= 0.38631 y= 0.89070 low= 939239 j=1200001
Pi = 3.130797 ztot= 801773.75 itot= 1200000

real 0m1.900s
user 0m1.720s
sys 0m0.000s

Pentium-4
Starting PI…
x= 0.38631 y= 0.89070 low= 939239 j=1200001
Pi = 3.130797 ztot= 801773.75 itot= 1200000

real 0m0.099s
user 0m0.096s
sys 0m0.000s

This somewhere between 17x and 19x speed difference, but compairing a ARM RISC ALU with a Pentium’s CISC FPU is not a fair comparison either. In other testing I was doing, I only got a 5x difference in performance, roughtly the difference between the Raspberry-Pi’s 700Mhz and the Pentium’s 3.0Ghz clock frequency.

As I got this benchmark from an old site, I was amused to note that this benchmark only makes the Raspberry-Pi about 56x times FASTER than a MicroVAX-II, a system I cut my teeth on in my programming life.

Life’s relative, maybe I should write that down.

Note; the GPU was NOT part of the testing.

UPDATE: I managed to get this bencmark to run on a Arduino Uno (16Mhz) and the Pi is 126 times faster, So much for using an 8 bit processor as a number cruncher :-)

UPDATE 2:

The new Raspbian Distribution, (after a recompile) produced this benchmark.

Starting PI…
x= 0.38631 y= 0.89070 low= 939239 j=1200001
Pi = 3.130797 ztot= 801773.75 itot= 1200000

real 0m0.539s
user 0m0.520s

sys 0m0.010s

or between 3.52 and 3.30 TIMES faster that the original Debian Squeeze distro. That makes it only about 5.44 times slower than the Pentium 4 at 3.0Ghz which I was detecting before with non numeric benchmarking. An interesting side note, due to the ‘Hard Float’ the timings incured 1/100 second of SYS time on the benchmark.

Learning Computers and Computing

I have been doing research into the nature of computers and I’ve been participating with with the phenomena know as Coderdojo. As part of my research I’ve been relearning Assembly language on several different architectures, and I’ve been experimenting with such things a the ELF Membership Card which I soldered myself and is currently running in front of me, along with a Arduino Uno. These both represent small microprocessor, very like the ones I personally started out on.

My first computer was an Apple II+ with a Motorola 6502 processor. But in any case, this act of relearning what a computer really is has made me aware of the lack of any real education ‘tools’ like I had. The sensation that is the Raspberry-Pi is fast becoming the CPU-du-jour of the developers, and as such may develop into a great educational tool. But, and there is always a but, it doesn’t stand on it’s own.

The group who developed the Pi have themselves noted that this is a developmental prototype, and that it needs to be distilled into a real educational product. It first need a keyboard, mouse, display a SD-Memory card and a power supply, to even turn it on. To make it useful as a net-workable it also needs a connection to hardwired Ethernet. It needs to have software preloaded onto the SD-Memory to boot properly. These are Geek requirements, anyone who can make this work, ALREADY has working knowledge and equipment, call it infrastructure, to make this work. What is missing in this is a standalone environment that is self contained and independent of both other systems, and other foreknowledge of computing.

My Apple II came with a keyboard, memory, built-in BASIC programing language, and displayed it’s output into a common Television, and recorded and loaded programs from a simple cassette player. All these elements were basic, everyday items in my household, and it would plug into the mains power directly, and display on a TV. It started up using Applesoft BASIC language and displayed on the screen everything I typed.

The Rasberry-Pi now needs this type of infrastructure. And while on this subject, and not to stir a pot, comes a language issue. The apple I learned on came with BASIC and in fact I still have a fondness for BASIC. The current arguments in the ‘Programming Education’ discussions are that a language like BASIC teaches BAD programming practice. Be in old, I had to remember the motivations of BASIC and was more enlightened to connect this with my reeducation about Assembly language. That was the first reason for BASIC! BASIC is and was engineered to, more or less, follow the structure of the instruction set of the CPU itself. Where language snobs see bad ‘GOTO’s in BASIC, I see machine language Conditional and unconditional ‘Branch’ instructions. Where I see a BASIC with line numbers (not all BASICs have them) I see ‘Linear’ machine instructions.

One element of the Raspberry-Pi that also misses the mark, is the nature of ‘abstraction’ while I admire the Python of the Pi, and the ‘C’ like language of the Arduino, what is missing is the distance between the learner programmer and the actual machine. It may even be a serious problem as the machine begins to look like magic, and that it can be made to do anything.

The programming of the RCA 1802 chip contained in the ELF Membership Card demonstrated what the creator of the card referred to as ‘Bare metal programing’. A simple program that I used to test the ELF with consisted of 12, 8 Bit instructions, writing (essentially) the same program for the Arduino required downloading of 998 8 Bit instructions (not including the 512 Bytes of the boot loader). To be sure there were probably a lot of libraries included in that download. Helpful, but masking the actual operations of the CPU from any real educational product. Just like that Arduino, the Raspberry-Pi will mask the CPU, and the associated hardware by a boot loader (BIOS), followed by a full, though striped to minimum, Linux kernel, and a GUI in the form of LXDE X-Windows, followed by Python language. That’s a lot of abstraction!

All these things may be irrelevant in the long term, one thing may lead to stimulation to explore the ‘Bare Metal’ hardware of the Raspberry-Pi while allowing a positive feedback with easy ‘wins’ on top of the abstraction provided. Still I believe we are missing an opportunity to produce the next generation of computer wizards. I also believe that someone needs to integrate the Rasberry-Pi into a OLPC type of device.