Speed comparisons

Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Speed comparisons

Post by FFMan »

In terms of trying to compare executions speeds of various zx chips I see from the tables that the ratings are :-

ZX24a 175,000 ins/sec
328n 2.9m ins/sec
328l 1/4m ins/sec

are these instruction counts comparable or is there an offset to be applied as the 328 is native mode or is the 328n truly 16.5 times quicker that the zx24a ?
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

The 328n is twice as fast as the 328l because its clock speed is double. In general native mode devices are faster than their ZVM equivalent. This is because the code is compiled down to native AVR machine instructions rather than interpreting an intermediate language. In either case these devices are much faster than Basic Stamps.

The performance benchmark used for the quoted numbers is rather simplistic but is better than nothing. Performance can also degrade based on the amount of I/O and waiting/sleeping you do in your application. A more speed up is 1 to 4 times.
Mike Perks
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

just running some simple math intensive loops the 328n is proving to be between 8 and 12 times faster - not very real world but it proves the raw pace is there which is good to know.
Post Reply