home .. forth .. colorforth mail list archive ..

RE: [colorforth] FS/Forth for DOS: crude performance test



> -----Message d'origine-----
> De : Samuel Falvo [mailto:falvosa@xxxxxxxxx]
> Envoyé : mar. 24 juin 2003 18:33
> À : colorforth@xxxxxxxxxxxxxxxxxx
> Objet : RE: [colorforth] FS/Forth for DOS: crude performance test
> 
> 
> > I think that 4IM ( http://membres.lycos.fr/astrobe ) may 
> interest you.
> > I'm also interested in comparing performances of our systems.
> 
> When I get the chance, I'll take a look at it.  It has to run 
> under DOS though
> (e.g., it cannot be a Windows command prompt application), 
> since my laptop
> neither has Windows on it, nor is it capable of running 
> Windows anymore.
> 

It is DOS and stand-alone. You make a floppy from a desktop computer and
boot your laptop with it.

> > 4IM is subroutine threade with code inlining. I've chosen 
> to you AX as stack
> > pointer and
> > SP as return stack pointer because XCHG AX SP is one byte 
> long and uses only
> > 3 cycles, which
> > allowed me to inline DROP, DUP and co. in the size of a call. 
> 
> My future FS/Forth will be built more for speed than small 
> compiled size.  I
> just recently upgraded my desktop computer to 640MB of RAM, 
> so I think I have
> plenty of storage space to do this with.  :-)  Even with the 
> laptop's 8MB,
> that's enough that I can afford 7 to 15 byte instruction 
> sequences if it helps
> me reduce the cycle counts.
> 

I believe the technique I uses is slightly superior to the ones using SI or
DI as data stack pointer, because it balances the load of managing it
through all the primitives whereas with SI or DI you got to make a trade-off
between, so to say, DUP and DROP.
But you're using BP instead. I think the idea of swaping SP and BP ( AX for
me ) may interest you because optimizing duplicated BP SP XCHG is very easy
to do. I did it in my "metacompiler" but not in my compiler but I could. By
the way I must warn you that size may matter. For instance, if you're
implementing IFs with straightforward JZ like I did, then you should take
care about jump ranges. If you're implementing IF using:
JNC L1
JMP L2
L1:
Then you pay twice. So take care. I think it's a bit dangerous to start with
"that's good enough" than "that's the best for me" at this level.

> --
> Samuel A. Falvo II
> 
> 

 Amicalement,
  Frederic

" Live at your own risk"


---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com