in reply to Fast sublist generation
There is a method, that does the whole trick about 3
orders of magnitude faster (for the hash size IŽm dealing
with i.e. 50.000 entries) PLUS it doesnŽt need recursion.
IŽll provide only the pseudo-code, because I got this idea
when I woke up today:
That way I reduce about 50.000 regexps to about 40 hashn=1; get the first n chars of $key; make a hash-lookup; if exists put to list of prefixes; get the last n chars of $key; make a hash-lookup; if exists put to list of suffixes; if n<length($key) { n++; reiterate }
Ciao
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Blazingly FAST (... yet oh so wrong)
by dragonchild (Archbishop) on Jul 30, 2001 at 17:46 UTC | |
by PetaMem (Priest) on Jul 30, 2001 at 18:01 UTC | |
by dragonchild (Archbishop) on Jul 30, 2001 at 18:17 UTC |