in reply to Slowdown when using Moose::Util::TypeConstraints with Regexp::Common
compiles your regex at compile time once and uses that precompiled piece of code in all your object-constructions, whereas useingmy $zip_re = qr/^$RE{zip}{US}{-extended => 'allow'}$/;
in your Moose-code will have to recompile your regex-code every-time again./^$RE{zip}{US}{-extended => 'allow'}$/
It doesn't explain why Perl on Mac OS X doesn't show as big a slowdown as Strawberry Perl.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Slowdown when using Moose::Util::TypeConstraints with Regexp::Common
by kevbot (Vicar) on Sep 02, 2008 at 20:38 UTC | |
by CountZero (Bishop) on Sep 02, 2008 at 22:33 UTC | |
by tye (Sage) on Sep 03, 2008 at 04:10 UTC | |
by JavaFan (Canon) on Sep 23, 2008 at 12:20 UTC | |
by kevbot (Vicar) on Sep 03, 2008 at 00:13 UTC |