[antlr-interest] attempt to compare antlr vs bison/flex performance
parrt at cs.usfca.edu
Thu Dec 20 09:39:36 PST 2007
Hi Minas. Can you try it on the Java grammar(s)? I spent a bit of
time making that fast.
On Dec 19, 2007, at 3:22 PM, Minas Hambardzumyan wrote:
> In an effort to compare antlr and bison/flex parsers, I did the
> following exercise:
> - found and compiled bison/flex "C" language parser from the
> following location:
> - downloaded and compiled antlr3 implementation of "C" language
> parser from this directory in antlr3 examples:
> - preprocessed a "C" language file and stripped it such that both
> parser would pass it through (mostly minor changes)
> - compared runtime for each parser
> The results of this exercise show that the antlr parser is ~9 times
> slower than the flex/bison parser. I have used the same version of
> GNU C compiler for both parsers, with exact same compile options.
> Although the grammar definitions come from different sources, I
> still think this exercise gives a general idea about performance
> differences of these parsers. Could anyone please tell me if this
> is an expected runtime difference or you think I could do some
> optimizations to get faster performance from antlr3.
> I can send the complete code I used for both parsers, or any parts
> of it, if necessary. Just tell me which part would be of interest.
More information about the antlr-interest