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

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Nov 12 18:24:45 PST 2004


On 11/13/04 2:20 AM, "Braden McDaniel" <braden at endoframe.com> wrote:

>>> 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()
> 
> Ruslan, so far you've provided no evidence that std::string is the
> problem. 

Right Braden, right.

But it is my expectation. And taking into account that I have spend months
in profiler optimizing Valentina 1.x I hope I can trust to my internal
intuition. 

Just my credo differ from credo:
    early optimization is devil.

I believe that each good developer of master level should feel what way is
better and faster. 

Of course std::string is not the only problem. No.
But I think it is one of the major problems.

We have string to parse, say 2000 bytes.
I do not see ANY REASON to copy any byte from this string to some other
location. Evertyhing can be done only with help of pointers.

You need token that points on firs word?
Okay, make 2 pointers
    p1  -> SELECT * FROM T
    p2  -> * FROM T

Why we need anything else ?!

100% enough... 

> That's not to suggest that it's not; but I don't think you'll
> get much traction for such a change without reproducible data.
> 
> (And that is without raising the issue of whose std::string we're
> talking about.)


And I remember on this list one guy from Russia have write 5-7 tips which he
have apply to generated parser and have made it several times faster.
I also going to find his letter and check if this can work for us.


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