Speed trials list
TimC
Posts: 77
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:
The task is how fast can the processor increment a variable 255 times
For the basic stamp here is the code:
In the 'C' world the code is like this (the delay is shorter so I can measure the ON period better)
If anyone has anything they want to try please add it.
Regards
Tim
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 LED PIN 0 ' variables x var byte y var byte Main: 'this program will loop forever high LED for x=1 to 255 y=y+1 next low LED pause 10 goto Main end
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 z=254; for(; z; --z) y++; output_low(TEST_PIN); // turn off delay_ms(1); // lets delay. } while (1);
If anyone has anything they want to try please add it.
Regards
Tim
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.