This is the mail archive of the
mailing list for the Java project.
Re: ReRe: performance (shellsort experiments)
- To: Norman Hendrich <firstname.lastname@example.org>
- Subject: Re: ReRe: performance (shellsort experiments)
- From: Kresten Krab Thorup <email@example.com>
- Date: 02 Sep 1999 12:25:48 +0200
- Cc: firstname.lastname@example.org, email@example.com
- References: <199908171557.RAA11736@tech13.informatik.uni-hamburg.de>
Norman Hendrich <firstname.lastname@example.org> writes:
> Interesting! I have often wondered how much runtime overhead the
> 'generic type' approach to data structures in Java really implied.
> I would never have guessed a factor of almost four, however.
> Seems that C++-style templates are worth-while after all...
With a dynamic compiler that does code-specialization, mosts of such
casts can be eliminated.
In context of static compilation, I expect that we could get a
significant win by just adding a mono-morphic inline cache. That is,
for each expression at the form
x = (Foo)y
we'd generate code like:
static _Jv_VTable* __tmp = 0;
if (y->vtable != __tmp)
_Jv_CheckArrayStore (y, Foo.class); // may throw exc
__tmp = y->vtable;
x = y;
Experiments with Self/Smalltalk in context of dynamic method
dispatch have shown that this kind of thing improves performance
dramatically, since most call sites are in fact mono-morphic. My bet
is, that this is also the case for most type-cast operations.
This would of cause require compiler changes.
On top of this, we can improve the performace of isAssignambleFrom;
but I thing the most significant single thing one could do right now
would be to implement uniquing for Utf8Const's, both in the linker and
in the runtime system.
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)