FYI
when disabling the static allocation of autos
the execution time rises to 0x2ef frames, i.e. 15 secs
That's an improvement, for sure. But i think HT for PC is far away from IAR. The latter appear to perform almost like SDCC.
I see also some true gems:
vrampeek:
LD A,E
AND 255 <-- A AND 255 always equal to A!
OUT (153),A
LD L,(IX+2) <-- Load L, ok
LD H,(IX+3) <-- Load H,ok
LD L,H <- LD l from H?
LD H,0 <- LD H with zero? And the previous ld ?
LD A,L <- LD A,L that is loaded with H that is loaded with (IX+3)
AND 63
OUT (153),A
Z80.
Now there is a MSX specific information:
Z88DK
Their updated the informations ...
I see also some true gems:
vrampeek:
LD A,E
AND 255 <-- A AND 255 always equal to A!
OUT (153),A
LD L,(IX+2) <-- Load L, ok
LD H,(IX+3) <-- Load H,ok
LD L,H <- LD l from H?
LD H,0 <- LD H with zero? And the previous ld ?
LD A,L <- LD A,L that is loaded with H that is loaded with (IX+3)
AND 63
OUT (153),A
Well, HTC too has some problems, but i'd say IAR has chosen the worst place to put inefficiency
Hey ARTRAG, i've done some comparative test from HTC and z88dk. The test is similar, times:
HTC: 8/9 secs
z88dk: 21 secs.
Here the list
#include <stdio.h> #include <sys.h> #define EI asm("ei"); #define DI asm("di"); void vdpsetreg (unsigned char regno, unsigned char value) { DI outp(0x99, value); outp(0x99, regno | 0x80); EI } unsigned char vrampeek(unsigned int addr) { DI outp(0x99, addr & 255); outp(0x99, (addr >> 8) & 0x3f); EI return inp(0x98); } void vrampoke(unsigned int addr, unsigned char byte) { DI outp(0x99, addr & 255); outp(0x99, 0x40 | ((addr >> 8) & 0x3f)); EI outp(0x98, byte); } static unsigned char vdpregs[] = {0x02,0x60,0x06,0xFF, 0x03, 0x36, 0x07,0x04}; void sc2() { unsigned char r = 0; while (r> 3) * 8 + (y & 7) + (((unsigned int)(y & 248)) << 5); vrampoke (addr, vrampeek(addr) | mask [(x & 7)] ); } void plotpoints(unsigned int x, unsigned int y, unsigned int cx, unsigned int cy) { setpixel((unsigned char)cx+x,(unsigned char)cy+y); setpixel((unsigned char)cx-x,(unsigned char)cy+y); setpixel((unsigned char)cx-x,(unsigned char)cy-y); setpixel((unsigned char)cx+x,(unsigned char)cy-y); setpixel((unsigned char)cx+y,(unsigned char)cy+x); setpixel((unsigned char)cx-y,(unsigned char)cy+x); setpixel((unsigned char)cx-y,(unsigned char)cy-x); setpixel((unsigned char)cx+y,(unsigned char)cy-x); } void circle(unsigned int cx, unsigned int cy, unsigned int radius) { int x, y, d; x = 0; y = radius; d = 3 - 2*radius; while (x the time should be taken from where the border color become white.
for z88dk substitute the include <sys.h> with <stdlib.h>
Pratically a similar test in pure MSX BASIC give rougly the same results of z88dk. However, i do not know how to optimize in z88dk.
would be a good idea to convert this program to pure Pascal. The compiler was created by Borland, and at the time they were very good optimizing compilers. Maybe we give us some surprise. Anyone want to try?
hitech C is not too bad , when sdcc beats them all it is only by 15% , and when hitech c wins code is often by 50%.
ADC and z88 are in average slitghly behind.