[antlr-interest] performance improvement in v3.2?

Chu Rui ruichu at gmail.com
Sat Jul 31 02:02:11 PDT 2010


Hi,
I am using ANTLRWorks 1.2.2 with ANTLR 3.1.1 in my previous work. My target
language is C.
It works well, but the performance is awkful. Moreover, the time consumption
looks non-linear, although there is (almost) no backtrack in my grammer
file.
It costs about 3 seconds for parsing 30k lines of script file, and 12
seconds for 60k lines.

Today I upgrade it to ANTLRWorks 1.4/ANTLR 3.2, and the performance is
improved dramatically. It cost less than 1 second for 60k lines. More than
10X of speed !
I am glad for such a result, but it also takes a little worry to me. How do
you(Jim Idle  or others) improve that between ANTLR 3.1.1 and ANTLR 3.2?
Does it reliable? Or is there any side-effect with that?

Anyway, thank you for your excellent work!

Rui Chu


More information about the antlr-interest mailing list