Re: [colorforth] Speed of the FIND loop
- Subject: Re: [colorforth] Speed of the FIND loop
- From: Nick Maroudas <alice@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 24 May 2003 19:20:15 +0300 (IDT)
Thanks to assembler lists provided by Terry Loveall (4word.lst)
and Tim Neitz (cfNasm.lst) one can compare Chuck's Colorforth
FIND loop (cf.asm - find word as a Huffnumber) against Terry's
FIND word as a text string (4word). Measuring from the initial load
ecx with dictionary size, to the final ret, I estimate Chuck's
numerical scasde technique occupiess 12 bytes, and takes 16 clocks
per loop, while the more conventional string find occupies 100 bytes
and takes about 60 clocks.
For larger dictionaries, would it be worthwhile to precompile the
dictionary in numerical order? (so as start scasde on the first
significant digit of the word that requires to be found)?
Nick Maroudas
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com