Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!mit-eddie!uw-beaver!cornell!rochester!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: <1813.UUL1.3#5129@willett.pgh.pa.us> Date: 5 Oct 90 03:27:29 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 28 Date: 09-27-90 (08:57) Number: 3865 (Echo) To: IAN WATTERS Refer#: NONE From: JONAH THOMAS Read: NO Subj: HASHING THE DICTIONARY Status: PUBLIC MESSAGE -> CH"thread" and searches backwards. The hashing algorithm is very -> simple and could be easily implemented as a code word. Anybody out -> there have any thoughts on this? -> Many Forths have hashed dictionaries. The one I wrote for a CP/M -> machine used 16 threads too, but a much simpler hashing function I wondered about using a binary tree for the dictionary structure. You could do a string comparison to get each place in the tree. With N words in the dictionary, you'd average log2 (N) misses before the hit. It would take double the space for the links, though, in a 16 bit Forth that would be 4N bytes instead of 2N bytes. It looked like it would be really fast, but I never actually tried it, my projects aren't big enough to worry about compile time, and if it starts looking like a problem I save a version of the system with the modules that are debugged already included. --- ~ NET/Mail : The MATRIX (5 Nodes/1.2 Gig) Birmingham, AL (205) 323-2016 ~ RNet 1.05M:* Metrolink - Front Porch BBS 404-695-1889 HST -Regional HUB ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp