in reply to Better way to search an Array?
Does all of your "index data" look exactly like that - each line begins with its line number, followed by whitespace, followed by three letters? If you could confirm that for us, that would allow for some major optimizations.
Anyway, the usual suggestions for speeding something like this up would be to load the index into a hash, or if the data structures get too big for memory, going to disk (e.g. a tied hash or array), or even into a database. See also the recent thread improve performance for some ideas in regards to using a hash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Better way to search an Array?
by doubleqq (Acolyte) on Jun 12, 2015 at 02:52 UTC |