[antlr-interest] Performance Exploration (C++ Library)

Bryan Ewbank ewbank at gmail.com
Tue Dec 14 07:01:42 PST 2004


There was a discussion here a while back -- wrapped up on 2004.10.26
by Don Caton -- about where performance is being lost, and a general
theory that replacing the scanner with lex would help quite a bit:

         http://article.gmane.org/gmane.comp.parsers.antlr-interest/1283

Well, I was curious (and there's a very good C++ example - thanks
Ric!), so I replaced my ANTLR scanner with lex.   Using gprof, I
learned that I saved around 10%.  That's okay, I guess.  Not what I'd
hoped for, but good enough to switch.

What surprised me is that the stuff associated with antlr::ASTRefCount
accounted for nearly 40% of the time reported in gprof.  On the one
hand, this makes some sense (the "forwarding" methods account for
around 15% of overall time) - but I was surprised to see assignment
taking nearly 10% of the time.


 
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