Subj : Re: Searching 40 Million short strings fast To : comp.programming From : Peter Ammon Date : Tue Sep 06 2005 09:16 pm Willem wrote: > Peter wrote: > ) The most important optimization I do is to look for duplicate suffixes. > ) Rather than store five links for "bring" and six for "string," both > ) can link to a unique "ring" sequence, which reduces the total number of > ) nodes from 390158 to only 52904. > > And what if you want to add "brings" ? You'd have to separate the links > again. Don't you need extra housekeeping to tell that one node is pointed > to from two locations ? > In my case, the data is static, so I can afford expensive preflighting. You're right that this optimization might be less useful if the data changes often. -Peter -- Pull out a splinter to reply. .