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

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Nov 12 15:35:24 PST 2004


On 11/13/04 1:19 AM, "Paul J. Lucas" <pauljlucas at mac.com> wrote:

>> * 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.
> 
> std::string (indeed, std:: everything) isn't usually (depending
> on your C++ vendor) some half-assed implementation.  The std
> classes are *supposed* to be written well so that people will
> use them.
> 
> Writing yet another string class makes any API using them
> annoying because then you often have to convert foo::string to
> std::string and vice-versa -- and that most definitely adds
> overhead and negates any performance improvement you may have
> gotten from using foo::string.
> 
> Granted, it's always possible to use an efficient tool in an
> inefficient way, so yes it's possible that std::string isn't
> being used efficiently; but that suggests correcting the use,
> not replacing the tool.

Paul,

Have you ever open the object of std::string In the debugger.
For different vendors this class have 2-3 levels of construction.
std::string class is very overloaded.

You argument that we will die on conversion
        foo::string to std::string

Let me answer that in our project we DO NOT use any STD classes,
Because we have prove they are not effective for our tasks... And because we
always can write own optimized for our task implementation.

May be ANTLR in the _public_ API which we will use in our apps,
Should expose just char*. Then "problem" you point will go away.
If you like std::string in your app no problems

    std::string str = antlr::foo_get_token()

If we like our own class

    fbl::String str = antlr::foo_get_token()

You know, I will kill for speed :-)

So I do not consider as problem do ANYTRHING
if this can increase speed in 2-5-10 times........


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




 
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