[antlr-interest] blog entry to new tree stuff
Sebastian Kaliszewski
Sebastian.Kaliszewski at softax.com.pl
Thu Jun 9 02:08:22 PDT 2005
Loring Craymer wrote:
> As I pointed out to Scott, the benefits of an adaptor are
> illusory: wrapping the root node of a tree before the walk gives
> equivalent or better capability (single adaptor has to know about all
> tree node navigation structures) at minimal cost--perhaps as many as 100
> wrapper nodes active versus the single adaptor--and that overhead is
> only incurred in the exceptional case where you wrap a tree before
> walking it.
As it was pointed already, an GCed language number of active nodes is not
important, number of *created* nodes is!
OTOH, that adaptor call overhead is illusory in fact as any good optimising
compiler will inline adaptor method calls! (You can make adaprot final and
then unless your java compiler is a crap it will surely inline adaptor's
methods).
rgds
--
Sebastian Kaliszewski
More information about the antlr-interest
mailing list