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

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Nov 12 15:05:03 PST 2004


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

* We have made loop to add million of records into db table.
Our kernel can do this using low level API Table.AddRecord()
In 98 seconds.

    mySQL can do this (using SQL commands, i.e. With parsing)
    in 323 seconds.


* Next we have made loop which execute million of parings of
    SQL command INSERT, which is full analog of above low
    level non-SSQL command.

Guess how much time this take?!
    1036 seconds !!!

    10 times slower then our Valentina kernel itself
    can do this task.

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

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.

* 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?! :-)



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