[antlr-interest] Hand made lexer 600(!!!!!) times faster of ANTLR'sone

Micheal J open.zone at virgin.net
Thu Feb 24 03:45:51 PST 2005


Ruslan,

> I remember excellent letter from another Russian developer
> where he have describe steps to improve. He also have point 
> that he have plug on allocation class.

OK, that narrows it down:
1. Alex Sedow or 
 
http://www.antlr.org/pipermail/antlr-interest/2004-November/010102.html
2. Anton Safonov
 
http://www.antlr.org/pipermail/antlr-interest/2004-January/006083.html

I'm pretty sure you're referring to Alex's post...  ;-)

> Really, It is easy to see that during parsing we build tree,
> then we kill the whole tree. So having own allocator in ANTLR 
> it is possible kill the whole tree not as million of delete 
> calls, but as single call to destroy the whole heap.

Agreed. 

On a related note, I'm interested in ideas about if and how something
similar can be achieved in managed langauges (i.e. Java/C#) or do we have to
trust the GC?

Micheal



More information about the antlr-interest mailing list