This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: benchmark result
On Thu, 2004-12-09 at 13:40 +0000, Andrew Haley wrote:
> > I doubt you could get much better results and keep the specified
> > semantics of the iterators. Well, it should be possible to inline the
> > iterator methods directly in the iterator caller but that would involve
> > knowledge of the iterator implementation in the iterator clients which
> > is something I cannot imagine possible in the current gcc codebase.
> > Maybe the linker could help...
>
> It's not exactly impossible, but it is tricky. I wonder if the
> iterator and all its methods can be final, but still conform to the
> spec? That would, at least, allow all the checkMod() calls to be
If a "final method" means that the method cannot be overriden and if a
"final class" means that the class cannot be subclassed, then, I believe
you could safely make this specific implementation of the Iterator
interface "final".
I fail to see how that would help checkMod to be inlined by the compiler
(as a side note, the java spec seems to say that a "private" method is
implicitely "final") within the Iterator methods but I am no gcc guru
so... I must say that I did not even try to verify whether or not
checkMod was inlined within its callers. I merely verified whether or
not the other iterator methods were inlined within the iterator clients.
Mathieu
--