Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Compiling Regular Expressions

by diotalevi (Canon)
on Feb 19, 2003 at 14:32 UTC ( [id://236640]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Compiling Regular Expressions
in thread Compiling Regular Expressions

A reading of _Mastering Regular Expressions_ leaves me with the impression that sometimes study() speeds things up but other times it just slows things down. So its actual behaviour on performance is likely dependant on your data, your regexes (which is also another sort of data) and then how often each data+regex combination is used. The way M_R_E leaves things, I'm not even sure you can arrive at any sort of truth by using benchmarks. Or... you can arrive at a local definition of truth only by testing your specific data + your specific regexes together.

The general idea is that a generalized benchmark for study() is invalid.


Seeking Green geeks in Minnesota

Replies are listed 'Best First'.
Re^5: Compiling Regular Expressions
by hv (Prior) on Feb 19, 2003 at 14:43 UTC

    It should also be noted that study() is not as well tested in perl as it ought to be, and as a result changes to the regexp engine over the years have managed to introduce various problems that cause study() not to gain as much speed as it should, and in some cases even give the wrong answer.

    In particular, I don't think study() knows anything about Unicode (though I haven't checked).

    The plan is that 5.10.0 should involve a big cleanup of the regexp engine, so this may improve in the future.

    Hugo

Log In?
Username:
Password:

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

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

    No recent polls found