Re: data structure for strings
Date: 2000/07/26
Message-ID: <397EDBA2.155A9116_at_moreira.mv.com>#1/1
Six times eight, 48. If you're in a 64-bit machine, it takes one cycle to compare two whole string of up to 8 characters each, represented as two 64-bit integers. Or do I misunderstand your question ?
Alberto.
Marc Tardif wrote:
> If I have 130 words of up to 6 characters, in what kind of data structure
> can I store these words for quick string comparison? In other words, if I
> have an unknown word, I need to determine if it is like any of the 130
> words. This data structure does not need to be expandable, the list will
> always be the same 130 words.
>
> I thought of using the Aho-Corasick algorithm for multiple-pattern
> matching, but considering each trie entry takes about 20bytes (tree ptr,
> next, fail, label) and each tree node another 16bytes (trie ptr, left
> node, right node, balance), that ends-up taking far too much memory. Any
> other ideas would be much appreciated.
Received on Wed Jul 26 2000 - 00:00:00 CEST
