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

micheal_jor open.zone at virgin.net
Sat Nov 13 11:33:26 PST 2004



--- In antlr-interest at yahoogroups.com, Ruslan Zasukhin <sunshine at p...>
wrote:
> Hi Guys.
> 
> Well, have gone 18 months as we have start to use ANTLR in our
project --
> Valentina DBMS, and now I have on hands results of benchmarks for
parsing.
> 
> They are not good :-(

Wasn't expecting otherwise given the subject of your post ;-)

<SNIP>

> ---------------------------------------------------
> We use C++ runtime of ANTLR.
> Benches was in the release compile, with full optimization on.
> 
> We have not study yet deeply where are problems.
> This is what we are going to do in the nearest time.

I was hoping you had run the code through a profiler to locate the
bottleneck *before* posting the results. That would have given us much
better performance info.

> Just I want to demonstrate that my expectation of bad performance of C++
> ANTLR runtime have become reality.
> 
> * We will try urgently switch to Lex lexer.

Well, you have been involved in many threads on ANTLR/C++'s
performance where the first advice is always to swich to a [F]Lex
lexer and, there is a sample that demonstrates this. 

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

Perhaps, but without hard profiling data, how can you be certain?.
More importantly, how can you convince other people to accept your
speculation?.

> * 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 can't but, I can at least ask that you take of one the simple
examples, generate the code then, modify a copy of the generated code
manually to implement the features you feel strongly about.

We can then test both versions. The results can then properly inform
the decisions that are made for v3 code generation.

Cheers,

ANTLR/C#






 
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