Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: Benchmarks aren't everything

by tilly (Archbishop)
on Oct 24, 2005 at 18:29 UTC ( #502547=note: print w/ replies, xml ) Need Help??

in reply to Re: Benchmarks aren't everything
in thread Benchmarks aren't everything

Given the history of regular expression implementations, it would be very surprising if Java actually did handle this correctly. Until Perl implemented a solution, the best approach that I'd heard of anyone using for this problem was to first do a DFA match to see if it matched at all, then an NFA match to figure out what the match was.

I don't have a Java compiler handy. But, for instance, this was not handled in Perl 5.005_03, and as of the last time that I checked, was not handled in Ruby, pcre (which is widely used in other applications), or pp-ccre.

If someone wishes to run a test Java program to see whether it has this optimization, I'd be interested to know the result.

Comment on Re^2: Benchmarks aren't everything

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-11-29 16:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (751 votes), past polls