I think, they are optimized away by the JRE... The figure from Mark does not have TokenWrapper hot spots in it, only TokenWrapper.termLength() is mentioned, but this is because Token.termLength() is often called and takes the same time (so the TokenWrapper time is equal to the inner Token call).
A lot of code in next()/next(Toke)/incrementToken() default impls uses final variables, so the delegation can simply be removed by the compiler. :-) ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Michael Busch [mailto:busch...@gmail.com] > Sent: Monday, August 10, 2009 10:09 PM > To: java-dev@lucene.apache.org > Subject: Re: who clears attributes? > > On 8/10/09 1:02 PM, Uwe Schindler wrote: > > If both filters would only implement new API there would be direct calls > > from the filter to the input TokenStream. If all streams/filters would > > implement only the old API, the bw-delegation would only be used for the > > incrementToken() calls from DocInverter. > > > True. It also seems like the delegation costs are not very expensive. > > Michael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-dev-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org