From: utzoo!decvax!ucbvax!C70:info-cpm Newsgroups: fa.info-cpm Title: Fast spelling checker Article-I.D.: ucb.1724 Posted: Sun Aug 8 15:18:44 1982 Received: Mon Aug 9 02:05:52 1982 >From MADLER@Mit-Ml Sun Aug 8 15:18:31 1982 How do companies like MicroPro manage to produce such fast spelling programs? Do they simply have small dictionaries? I have been working on a program that is running 10-20 times slower (at least) than some performance specs I have seen (3 pages, double spacing takes 3 minutes!!!) So far, I have alphabetized my dictionary and have compressed it by putting a byte at the beggining of approporiate words indicating the number of characters to copy from the previous word (if it saves space, this is done). Each word has 2 bytes following it of suffix byte flags. The dictionary has approximately 48,000 words as a result of the flags and resides in 92K. The program has an index in memory so that only one 256 byte dictionary record need be read for each word. The directory is automatically buffered (eliminate directory seek over extents). I have gone so far as to fill up RAM with as much of the dictionary as I can. Anybody have any suggestions to improve efficiency. I am sure that the slowest part is disk accessing (5.25" floppies, 20ms track to track). I guess I should minimize head travel. Does a reasonable algorythm exist? Thanks, -Michael