Reposted from Zilog Z8Encore Group
2004-06-11 by weston54
From: "ECROS Technology" <YahooGroups@e...> Date: Thu Jun 10, 2004 2:29 pm
Show quoted textHide quoted text
Subject: Another performance comparison Z8 Encore! vs ATmega16 ADVERTISEMENT Having published a performance comparison showing the ATmega64 to be four times faster than the Z8 Encore!, I am obviously concerned that I've done something wrong and falsely denigrated the Z8 Encore!. Of course, performance isn't always an issue, so this isn't necessarily such a big deal. Porting my operating system, ECROS, to the ATmega64 has been on my list of things to do and I got around to starting it today. I've got to the point where another performance comparison is possible. I'm afraid the factor of four holds. I have the ECROS scheduler, timers and event mechanism working. I'm not using stream I/O and I've compiled out the execution profiler, so it's a lean and fast configuration. I have two tasks, both at the same (high) priority. One gets an event every 500 ms from a repeating timer and flips an LED so it flashes once per second. This is just to make sure that the OS timers are working. The other task has an event set which it never clears and therefore runs over and over again. It also flips an LED. I am measuring the frequency of the second LED flashing. This gives me a measure of the task switching time of the OS. In other words, I can time the code path from where the always-ready task flips the LED back into the scheduler, through all the scheduler's internal workings (updating timers and picking the next, usually the same, task) and back to the LED flip point in the task again. Since the task does so little, most of this time is used by the scheduler. Z8 Encore! at 18.432 MHz with ZDS II 4.8.0 --- 52 us (measured 9.60 kHz) ATmega64 at 15.36 MHz with AVR-GCC 3.3.2 --- 12.5 us (measured 39.9 kHz) Since this code has nothing in common with the Dhrystone code, the conclusion seems inescapable. If you're looking for best execution speed at a given cost and power point, the Z8 Encore! is unlikely to be your best choice. As compared to the Z8 Encore!'s four symmetrical timer/counters, the ATmega64 has two 8 bit timer/counters which are slightly different and two 16-bit timer/counters. I think they can do some tricks that the Z8 Encore! can't, but I have to admit it's a chore figuring each one out separately. I think the Z8 Encore! is easier to understand and use in this regard. Graham. http://www.ecrostech.com