in reply to Re^3: hash substitution in regex
in thread hash substitution in regex
I wonder what changes one would consider if the lists were long and you were worried about performance.
Hashes are relatively fast; if you're worried about loading the whole thing into memory, a database (such as DBD::SQLite) or maybe DBM file come to mind.
But first, how large are the files? How much memory and CPU usage is "too much"? If you're not approaching those limits don't worry just yet :-)
(By the way, while it doesn't really hurt anything except readability, you don't need to declare use strict; use warnings; etc. at the top of every sub if you've already declared it at the top of the file.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: hash substitution in regex
by Aldebaran (Curate) on Aug 21, 2014 at 19:38 UTC |