Good evening! On Thu, Sep 20, 2007 at 07:36:21PM +0200, Andreas Koch wrote: > I wonder if the factor 7 between 6502 and AVR is caused by > cc65 vs. gcc performance, or by the processors itself. > (The code basically does some masking and shifting, a large > switch/case and some 32 bit integer multiplication/division). The AVR is a RISC CPU with direct clock input that executes many operations in one clock cycle. That means that an AVR clocked at 10MHz runs with almost 10 MIPS (probably 7-8 for real code) - compared to about 0.3-0.4 MIPS for the 6502. The AVR does also have a large register bank (32 8-bit registers) and some of these registers may be combined as 16 bit registers to hold pointers for example. Depending on the type of AVR, it does also have an 8x8 multiply command which will enormously speedup multiplications for larger operands. With this in mind, the suprise is not how good the AVR came off but just the opposite: How well the good old 6502 performed. Regards Uz -- Ullrich von Bassewitz uz@musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Thu Sep 20 20:52:23 2007
This archive was generated by hypermail 2.1.8 : 2007-09-20 20:52:25 CEST