class initialization check overhead

Tom Tromey tromey@redhat.com
Mon Nov 25 22:10:00 GMT 2002


>>>>> "Anthony" == Anthony Green <green@redhat.com> writes:

>> On Thu, 2002-10-24 at 02:10, C. van Reeuwijk wrote:
>> - Within a method, keep track of the classes already initialized,
>> and don't initialize a class again if you know for sure that it, or a
>> subclass, has already been initialized.

Anthony> I know we used to do this (without the subclass trick), by generating
Anthony> something like the following for "x = foo.bar.y"...

I like the subclass trick, and I submitted a PR for this.

We still do the class initialization optimization you mention.  I
don't remember it changing greatly since it was first implemented
(though maybe I missed something).

Tom



More information about the Java mailing list