classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.net.URI implementation


From: Per Bothner
Subject: Re: java.net.URI implementation
Date: Mon, 10 Feb 2003 09:15:27 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

Giannis Georgalis wrote:
I agree with you. I found JFlex <http://www.jflex.de>, that is *much*
faster than a hand-written scanner, as the benchmarks below
show.

I think space is *much* more important than speed when it comes
to parsing URIs.  How big is the generated scanner?

I'm also skeptical as to how JFlex is faster.  The only thing I
can think of is that a generated parser might use fewer method
calls that most hard-written parsers.  But unless you show
a hand-written parser next to the JFlex parser, I can't tell
whether the hand-written parser is just poorly written.

Of course a complicated Perl-style regular expression with
backtracking will be very difficult to implement by hand,
but parsing URIs shouldn't need that.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]