Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: The cost of unchecked best practices

by bart (Canon)
on Mar 20, 2008 at 20:18 UTC ( [id://675295]=note: print w/replies, xml ) Need Help??


in reply to Re: The cost of unchecked best practices
in thread The cost of unchecked best practices

Does that mean that, apart from these optimizations, the regex engine got actually slower in other cases? I see that the benchmark for "literal" dropped from 8E5/sec to 7E5/sec. That's a speed drop of about 12%. I assume these benchmarks are run on the same computer...
  • Comment on Re^2: The cost of unchecked best practices

Replies are listed 'Best First'.
Re^3: The cost of unchecked best practices
by ikegami (Patriarch) on Mar 21, 2008 at 00:06 UTC
    Yes, same computer. I just reran the tests (3 times each, one after the other), and got the same results as before:
    >c:\progs\perl588\bin\perl 674979.pl Rate class_nodot class literal class_nodot 3037/s -- -24% -100% class 4008/s 32% -- -100% literal 859954/s 28218% 21354% -- >c:\progs\perl588\bin\perl 674979.pl Rate class_nodot class literal class_nodot 3041/s -- -26% -100% class 4087/s 34% -- -100% literal 868745/s 28464% 21158% -- >c:\progs\perl588\bin\perl 674979.pl Rate class_nodot class literal class_nodot 3041/s -- -26% -100% class 4117/s 35% -- -100% literal 834248/s 27329% 20162% -- >c:\progs\perl5100\bin\perl 674979.pl Rate class_nodot literal class class_nodot 667282/s -- -10% -11% literal 741037/s 11% -- -1% class 747754/s 12% 1% -- >c:\progs\perl5100\bin\perl 674979.pl Rate class_nodot literal class class_nodot 667704/s -- -10% -12% literal 742924/s 11% -- -2% class 758776/s 14% 2% -- >c:\progs\perl5100\bin\perl 674979.pl Rate class_nodot literal class class_nodot 657342/s -- -11% -14% literal 740217/s 13% -- -3% class 766213/s 17% 4% --

    So yes, something is slower. Not necessarily the regexp, but it's likely.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://675295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-23 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found