|
Re: [QUIZ] Perl 'Easy' Quiz of the Week #2005-1 (benchmarking: sorry): msg#00057lang.perl.qotw.discuss
On Sun, Jan 30, 2005 at 11:46:10PM +0100, David Jones wrote: > This can be (very) slightly improved by compiling the regex just once > (replace the body of the while loop with the following): > > my ( $pref, $suff ) = /(\w+)\.([A-Z])/o; > > Average time: 45 seconds It's a constant regex, so it's only compiled once anyway. /o is a no-op if the regex doesn't interpolate any variables. Ronald |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Fw: [SPOILER] Perl 'Easy' Quiz of the Week #2005-1: 00057, Bill Smith |
|---|---|
| Previous by Thread: | Re: [QUIZ] Perl 'Easy' Quiz of the Week #2005-1 (benchmarking: sorry)i: 00057, David Jones |
| Next by Thread: | [SPOILER] Perl 'Easy' Quiz of the Week #2005-1: 00057, Bill Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |