This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Fibonacci and performance
- To: Per Bothner <per at bothner dot com>
- Subject: Re: Fibonacci and performance
- From: Tom Tromey <tromey at redhat dot com>
- Date: 27 Apr 2001 10:25:15 -0600
- Cc: Java Discuss List <java at gcc dot gnu dot org>
- References: <874rval8r6.fsf@creche.redhat.com> <m2oftipbra.fsf@kelso.bothner.com>
- Reply-To: tromey at redhat dot com
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
>> I wonder if inlining the "already initialized" check from
>> _Jv_InitClass would help or hurt (due to increased code size).
Per> The only class I can see that needs to be initialized in Fib.fib
Per> is Fib itself, but that has already been initialized - since
Per> we're executing Fib code. Don't we test for this situation? If
Per> not, it shouldn't be difficult to add. Basically, drop calls to
Per> _Jv_InitClass if the class being initiazed is the current class
Per> or one of its super-classes.
Per> Or am I misunderstanding something?
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.
Tom