[antlr-interest] ASTPair handling in C# runtime for 2.7.6

Micheal J open.zone at virgin.net
Wed Oct 26 16:05:30 PDT 2005


> Has anyone actually tested how big the performance impact is? 
> This is of course application dependant, but in my experience 
> doing such optimisations without a good benchmark is not a 
> good idea, especially in managed code (in my case: Java code, 
> but probably applies to .NET, too).

Yes. I did with a couple of in-production grammars with input files
typically over 3MB in size. Hundreds of thousands of the damned things were
alloc'ed even though the longest only call-chain was only a few thousands.
With larger files, that alloc'ed resource and the resulting GC churn was an
issue. That is what led to the original change to use an object pool in
2.7.5. 

Jim Crozman did as well. He reports about this in the thread.

Option 1 seems to have it all IMO.

Cheers,

Micheal



More information about the antlr-interest mailing list