type check overhead (performance...)
Kresten Krab Thorup
krab@daimi.au.dk
Fri Sep 3 03:05:00 GMT 1999
Tom Tromey <tromey@cygnus.com> writes:
> Norman> Perhaps you could just optimize the store-into-Object and
> Norman> store-into-Object[] cases?
>
> You can't optimize the store-into-Object[] case because a Double[] is
> an Object[]. That is the problem: if you know that the array is
> actually an Object[] and not some sublcass, then you can optimize.
> However, in the code posted so long ago, this was not the case.
We only know the exact type of Foo[], right after Foo[] is created or
if Foo is Final.
-- Kresten
Kresten Krab Thorup "I like my eggs ploded"
Department of Computer Science, University of Aarhus
Aabogade 34, DK-8200 Aarhus N, Denmark
+45 8942 5665 (office), +45 2343 4626 (mobile)
More information about the Java
mailing list