Fibonacci and performance
Fri Apr 27 09:33:00 GMT 2001
Tom Tromey <email@example.com> 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
More information about the Java