classpath
[Top][All Lists]
Advanced

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

Re: java.net.URI implementation


From: Giannis Georgalis
Subject: Re: java.net.URI implementation
Date: 10 Feb 2003 18:47:57 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Brian Jones <address@hidden> writes:

> Giannis Georgalis <address@hidden> writes:
> 
> > Please, tell me your thoughts and suggestions about this matter.
> 
> ANTLR is usually the better choice for parsing as far as I know, but
> I'm not really that knowledgable on grammars and parsing anyway.  It's
> fine to do this btw, since we can checkin the parser generated classes
> to avoid a build dependency here.

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. JFlex is under the GPL, so there's no problem in using it for
classpath.

If there's no objection I'll implement the parser using JFlex.

lines   KB      JVM     handwritten scanner     JFlex generated scanner

19050   496     hotspot         824 ms                  248 ms  235 % faster
6350    165     hotspot         272 ms                  84 ms   232 % faster
1270    33      hotspot         53 ms                   18 ms   194 % faster
19050   496     interpreted     5.83 s                  3.85 s  51 % faster
6350    165     interpreted     1.95 s                  1.29 s  51 % faster
1270    33      interpreted     0.38 s                  0.25 s  52 % faster




-- 
 Object-oriented programming is an exceptionally bad 
idea which could only have originated in California.
    - Edsger Dijkstra (attributed)





reply via email to

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