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

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Nov 12 18:08:38 PST 2004


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

>> 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.
> 
> You do realize that std::string is actually a template

:-) Paul, I am not newbie.

We have eat a dog on optimization issues.

FYI, Valentina is known to be faster in hundreds of times of other dbs.
And Valentina is true disk-based DBMS. I.e. I mean we get our speed not
because we are RAM-based db, no. just we use special algorithms. May be some
code we write in more effective way than mySQL guys...

So do not worry, we know what is a C++ template and how they works :-)

> and that you can plug-in your own underpinning while retaining the
> std::string API, right?

actually not so easy task
 

>> 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()
> 
> And then the problem is right back again: if ANTLR used
> std::string internally (or any string) and it converts to char*
> and if you use some string class, your object ("str" above) has
> to construct itself -- performance hit.

No, because if antlr::string will be as light-weight as 8 bytes (2 pointers)
And will give us before this 10 times win, then construction of my::string
is still wining.

In the worse case I can even not my::construct string object.
I can just call strcmp or else string methods.
So work will be done only in pointers.


> Now if ANTLR returned
> std::string by reference and you did the assigment above, it's a
> simple pointer copy.

-- 
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