Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Why study SCALAR?

by LunaticLeo (Scribe)
on Dec 26, 2001 at 22:20 UTC ( #134450=note: print w/replies, xml ) Need Help??


in reply to Why study SCALAR?

study() is intended to be used to help optimize regular expressions on the scalar.

I have done benchmarks repeating the same regex on the scalar, and multiple regex's on the same scalar. I have never found a speedup.

BTW, my benchmarks were like:

use Benchmark qw(&cmpthese); $STUDIED_TEXT = $TEXT; study $STUDIED_TEXT; cmpthese($COUNT, { 'with study' => \&fn1, 'w/o study' => \&fn2 } );
Basically, study() is an anachronism. Feel free to ignore it, everybody else does.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2020-03-29 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (169 votes). Check out past polls.

    Notices?