[antlr-interest] Performance Issues

Bryan Ewbank ewbank at gmail.com
Fri Oct 21 18:30:01 PDT 2005

I've been having some discussions with the "powers that be" where I
work regarding whether ANTLR is up to the task we have set before it. 
We have it working (lex scanner; ANTLR parser, multiple tree parsers,
C++/linux), but the performance is pretty bad (~3 seconds to clone the
AST for a 10K line input file for a C-like language).  A first quick
glance at gprof doesn't show any obvious outliers or idiocies;
however, I know there's more to be done with profiling.

I got the impression, several times, that people were pleased with the
thruput of ANTLR for parsing and tree transformations.  Yes, there are
a few "classic" tunings required - I'm working thru the information
from this list over the past few yearse - but still...

Our productivity is certainly higher with ANTLR, particularly for the
tree-parsers; however, if customer perceived thruput is "bad"
(whatever that means, right :-), it's a serious problem.

So, has anyone been holding out on tunings, optimizations, and
outright tricks that they are using to get ANTLR to eat trees faster? 
Again, I'm in the C++ world, so java suggestions don't help.

Thanks from a harried ANTLRite,
- Bryan Ewbank

More information about the antlr-interest mailing list