[retroforth] Re: Speed up of 'find' word

  • From: "Ron Aaron" <ron@xxxxxxxxxxx>
  • To: retroforth@xxxxxxxxxxxxx
  • Date: Tue, 25 Jan 2005 09:29:37 -0800 (PST)

On Tue, January 25, 2005 9:20, Helmar Wodtke said:
> retroforth@xxxxxxxxxxxxx schrieb am 25.01.05 18:03:29:
> Hi Ron,
>
> another idea for speed up the linear search in dictionary for FORTH programs,
> is to keep track of the position that linked to the found entry in dictionary
> and remove the found entry from dictionary and put it on the top of the
> dictionary.

This would be a big speed increase in the usual case (after a word has been
found) but would slow down programs which don't exhibit locality.

It would also be a little tricky to implement, one would have to take care to
fix up pointers properly...


-- 
My GPG public key is at http://ronware.org/
fingerprint: 8130 734C 69A3 6542 0853  CB42 3ECF 9259 AD29 415D




Other related posts: