knudsen@ihnss.UUCP (11/02/84)
<bitty bitty bitty> Couple weeks ago, someone posted some benchmarks on micro.cbm about the Sieve of Eristothenes prime-finder benchmark on the 6502, and solicited results from other 6502 machine owners (Atari, Apple, etc). Well, the 6809 is sort of a cross between the 6502 and the PDP-11, so I had to jump right in too. So far I have done only compiled C. The results: Commodore 64 C: 28 sec in original posting Coco OS-9 C: 21 sec Bear in mind three things: (1) The Color COmputer clock rate is only 0.895 MHz; I'm sure the C-64 runs faster, so my result is even better than it looks. I'm not saying the 6809 is a superior micro to the other 8-bitters, but lots of other people have already.... (Would someone please mail to me what the C64 clock is?) Yes, it IS legitimate to directly compare 6800. 6502, and 6809 clocks (but not with 8080 types). (2) I made trivial mods to the posted C code to take advantage of 6809's auto-increment/decrement instructions, e.g.: for(i=0; i<8191; i++) flags[i]=1; becomes for(i=0; i<8191; ) flags[i++]=1; (3) Microware/TRS OS-9 C compiler allows global and static variables to be declared DIRECT, meaning ZERO PAGE in 6502-ese. This declaration bought me about 1.5 seconds of realtime over the 10 iterations posted. Of course, 6502-based C compilers should allow this also, but note that the 6809 can move its "zero" page to any page in memory, so each process or routine can have its own. Stay tuned for BASIC, assembler, and BASIC-9 (~=PASCAL) results. mike k