[antlr-interest] Performance of ANTLR-generated lexer/parsers
Terence Parr
parrt at cs.usfca.edu
Wed Aug 23 13:51:01 PDT 2006
Hi. You might try ANTLR v3, which is 2x or 3x due to lexer and other
junk. still in beta.
Ter
On Aug 23, 2006, at 12:59 PM, Charles Felstead wrote:
> Hello,
>
> I've used ANTLR 2.7.6 to create a C++ parser for a simple XML file.
> The goal was to compare some metrics with a Xerces-C++ parser (uses
> DOM).
>
> The first thing we found out (as we expected) is that the ANTLR-
> generated parser is much MUCH smaller in static footprint.
> Regarding the dynamic footprint, we know the Xerces-based parser
> uses more memory...but we don't have all the numbers yet.
>
> Now what really surprised us is the speed of the parsers. We were
> expecting the ANTLR-generated parser to be much faster than the
> Xerces-based parser. After all, the ANTLR parser is specific to
> that one type of file I'm parsing whereas the Xerces is generic.
> Turns out the Xerces parser, is about 15-25% faster than the ANTLR
> one??!
>
> So, my question is, can I flip some switches or configure the ANTLR-
> generated parser to improve the performance??
>
> Thanks,
> Charles.
More information about the antlr-interest
mailing list