in reply to
Re: Regexp Legibility
in thread Regexp do's and don'ts
Looks like eval runs faster...
Rate as usual with do
as usual 63091/s -- -29%
with do 88496/s 40% --
Rate with eval as usual
with eval 59773/s -- -9%
as usual 65359/s 9% --
No, it doesn't look like that.
In one run "with do" was 40% faster than "as usual", while in the second run, "with eval" iswas 9% slower than "as usual".
The "Rate" shows you how many times the specific routine could be run per time unit, so in this case, runs per second.
What makes you think, that the eval-solution runs faster? ;)
BTW, you can do comparisons with more than two subroutines. So you can do one run and compare all three (or more) routines.
shiny regexes and rules offered by Perl 6
other CPAN module
by looking at it on my monitor
I print it and I read it in spare time
first I convert it into $FORMAT, then I parse it
I hire someone to do it
using my custom module
I write a brand new language to do the task
on the server where I play as human, XML is forbidden
what is XML?
I speak XML natively
I write a new grammar for Perl 6
some other way
Results (268 votes),