[antlr-interest] Generated C++ Parser Performance

Ric Klaren klaren at cs.utwente.nl
Tue Mar 16 00:41:17 PST 2004


Hi,

On Tue, Mar 16, 2004 at 05:09:32AM -0000, cwrenniks wrote:
> Been doing some testing in a cross language project, generating my
> grammar in both C++ and Java. I've noticed that the Java parser is
> much faster than the C++ parser, which surprised me. We generated
> the parser over to C++ looking for more performance, and were bummed
> when it went the other way! Is this going to be corrected?

Must be something in your grammar that triggers some pathetic case. In
general the C++ parser is faster (not much but faster still). Can't say
much without seeing some common practices in the grammars. As Loring
pointed out it may be beneficial to see which part of the parser is the
time hog. 

Might be that you're using some expensive constructors/destructors in a few
critical areas (treeparser maybe?).

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  Before they invented drawing boards, what did they go back to?



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list