in reply to Re^2: storing a qr// compiled regexp in a database?
in thread storing a qr// compiled regexp in a database?
A "precompiled regex" is mostly a string, at least from the Perl view of things. And the best you could do to save a regex in a database is to stringify it and then recompile it from that string anyway.
I think you're looking in the completely wrong direction if you're trying to optimize such minor things. Have you profiled your application already? Does it really spend that much time on compiling (and recompiling) regular expressions? Maybe you should reduce the number of regular expressions then. A good profiling tool is Devel::Dprof. It's also the only profiling tool.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: storing a qr// compiled regexp in a database?
by ManFromNeptune (Scribe) on Sep 17, 2005 at 21:52 UTC | |
by traveler (Parson) on Sep 18, 2005 at 17:55 UTC |