Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Conventions and "tricks" used in Forth Message-ID: <1936.UUL1.3#5129@willett.pgh.pa.us> Date: 28 Oct 90 17:36:43 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 23 To: IAN WATTERS Refer#: 4094 From: RAY DUNCAN Read: NO Subj: CONVENTIONS AND "TRICKS" Status: PUBLIC MESSAGE Forgetting is no problem. To FORGET a word, we find it via the hash table, truncate the header segment at that point (thereby also discarding all subsequently defined words), then rebuild the hash table from scratch. The routine which builds the hash table is all in assembler and very tightly coded, so the user never notices any delay after FORGET; the only other time you have to build the whole hash table is at boot, and that delay is hidden inside the Forth system's load time. Collisions are chained, but the chains tend to be very short; even with a couple thousand words in the dictionary, the average chain length is less than 2. In a way this is the extreme case of the multithreaded dictionary! NET/Mail : LMI Forth Board, Los Angeles, CA (213) 306-3530 ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp