This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fibonacci and performance


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]