[antlr-interest] C++ is slower than Java?

Terence Parr parrt at jguru.com
Sun Feb 24 09:58:48 PST 2002

On Sunday, February 24, 2002, at 05:23  AM, keren_jefet wrote:

> Hi,
> I have tested the java.g example both on Java-generated parser, and
> on Cpp-generated parser (antlr-2.7.1, buildAST=true).
> Surprisingly, I found out that the Java parser, was significantly
> faster than the Cpp one, especially when handling long java source
> files. (sometimes even 600% faster...)
> How can that be?
> Is this related to the specific java.g grammar definitions, or maybe
> it is true for all parsers, no matter of the grammar complexity?

It must be something weird with the C++ libraries for ANTLR.  Ric has 
done lots of work for 2.7.2a2.  Can you download that and try it?

Chief Scientist & Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list