On Wed, 10 Dec 2003 20:11:26 +0100, "Jenda Krynicky" <[EMAIL PROTECTED]> wrote: > > 1. Perl builtins and especialy the regular expression engine is > heavily optimized. So it might very well be quicker to use a regexp > from Perl than to implement the same stuff in C. Unless you spend a > lot of time tweaking the code. > > 2. One regexp (assuming its created well) will almost always be > quicker than several loops and ifs in Perl. > > While you should not use a regexp where the "normal" functions > suffice, you should not go into great lengths implementing something > that would be simple as a regexp. It'll be harder to maintain and > most probably slower. > > 3. If you really need to know which solution is quicker > use Benchmark; > > > Jenda
Thank you, Jenda! That is the kind of answer I was looking for. -- -------- "And there came a writing to him from Elijah" [2Ch 21:12] -------- R. J. Brown III [EMAIL PROTECTED] http://www.elilabs.com/~rj voice 847 543-4060 Elijah Laboratories Inc. 457 Signal Lane, Grayslake IL 60030 fax 847 543-4061 ----- M o d e l i n g t h e M e t h o d s o f t h e M i n d ------ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>