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

Micheal J open.zone at virgin.net
Wed Oct 26 11:27:59 PDT 2005


Hi,

For background info, pls see this thread:
 
http://www.antlr.org/pipermail/antlr-interest/2005-April/011838.html


The options currently being considered are (in order of attractiveness):

1. Rewrite ASTPair as a struct.
   Pros: no heap allocations, no GC impact/churn
   Cons: breaking changes to ASTFactory methods (and client code):
         - makeASTRoot() and 
         - addASTChild() 

2. Provide a per-instance object pool
   Pros: fixes multi-threading issue, reduces ASTPair allocations
   Cons: future GCs may be more efficient, GC impact

3. Return to the pre-2.7.5 scheme and allow the GC to clean up.
   Pros: fixes multi-threading issue, leverages GC improvements
   Cons: more ASTPair allocations, GC impact

Any opinions?.

Cheers,

Micheal
ANTLR/C#



More information about the antlr-interest mailing list