[antlr-interest] BENCHMARK. ANTLR. Bad results.

iank at bearcave.com iank at bearcave.com
Fri Nov 12 15:40:50 PST 2004



> * but IMHO on of the main problems of ANTLR C++, is that it heavally uses
> std::string class and a lots of *copying* of string when it parse tokens.
> * may be another problem is in exceptions, although I like mechanizm of
> exceptions. 
> 
> I think that for 3.0 Rick and community should produce own, special,
> very optimized for ANTLR tasks antl::string class. This class should
> simply have 2 pointers on start/end of tokem. Pointer must point
> directly into original parsed text. There is no need copy any byte
> of parsed text. Everything must work on pointers. Tell me that I am
> wrong?! :-)

  I wrote a reference counted string container originally for ANTLR.
  However I never integrated it into ANTLR.  Obviously it is written
  in C++ and is available under something like the BSD license (e.g.,
  you can do what ever you want with it, but you can't blame me for
  any problems you encounter).  See

     http://www.bearcave.com/software/string/index.html

  I have not benchmarked this against the GNU std::string, so I don't
  know if it is faster or not.  It does properly implement reference
  counted copy-on-write semantics (which is more difficult than I
  thought in C++).  So copying should not be an issue, since it just
  copies pointers.

  Ian


 
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