View Full Version : Speed trials list

04-10-2007, 10:09 AM
HI All,
In the April Issue of Nuts and Volts there was an article by Chuck Hellebuyck about running a simple test to see how processors compared in speed. Since I have a bunch of chips myself I thought it would be fun to compare more. I ran all the chips at the top speed so in the case of the PIC's and AVR chips they are all running at 20Mhz. I agree with everything he printed in Nuts and volts so I combined it all:

PICAXE 28x @4mhz 368msec from N&V
BasicStamp2 278msec
Basic Atom 68msec from N&V
BS2px24 60msec
Javelin 22msec
PICBasic PRO PIC16F877 0.350msec
CCS 'C' PIC16FF877 0.350msec
GCC 'C' Mega32 0.192msec
ARM LPC2148 0.065msec

The task is how fast can the processor increment a variable 255 times
For the basic stamp here is the code:

'{$STAMP BS2px}
'{$PBASIC 2.5}

' connections
' variables
x var byte
y var byte

'this program will loop forever

high LED
for x=1 to 255
low LED
pause 10

goto Main


In the 'C' world the code is like this (the delay is shorter so I can measure the ON period better)

do {
output_high(TEST_PIN); // turn on voltage
for(; z; --z)
output_low(TEST_PIN); // turn off
delay_ms(1); // lets delay.

} while (1);

If anyone has anything they want to try please add it.

Paul Baker
04-10-2007, 10:25 AM
I calculate the propeller·would take ·25.5 uS for the incrementing loop, plus whatever setup is required, oh yeah and it will do it eightfold simulatenously :).

Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)