Fibonacci and performance

Per Bothner
Fri Apr 27 09:33:00 GMT 2001

Tom Tromey <> writes:

> Nope, Fib.fib is initializing the Fib class over and over.  I don't
> know if we test for this situation or not, but I assume not.  I guess
> this would only affect recursive calls.

What I forgot was that we do the Jv_InitClass at the start of the
called method, not at the call site.  This saves code space, but
it makes it harder to optimize the call away when it is unneeded.
We might re-consider this decision if/when we get smarter about
	--Per Bothner

More information about the Java mailing list