ReRe: performance (shellsort experiments)

Tom Tromey tromey@cygnus.com
Tue Aug 17 14:48:00 GMT 1999


>>>>> "Norman" == Norman Hendrich <hendrich@tech.informatik.uni-hamburg.de> writes:

>> [Object sorting with    _Jv_CheckArrayStore():   59 seconds]
>> [Object sorting without _Jv_CheckArrayStore():   17 seconds]
>> [Double sorting (=specific type):                16 seconds]

Norman> Interesting! I have often wondered how much runtime overhead
Norman> the 'generic type' approach to data structures in Java really
Norman> implied.  I would never have guessed a factor of almost four,
Norman> however.

It can be less.  Our implementation of _Jv_CheckArrayStore (actually
Class.isAssignableFrom) is particularly naive.

Norman> As the above result shows, having a smart compiler that
Norman> detects this situation (reassigning an object to an array)
Norman> might really help

Yeah.

Tom


More information about the Java mailing list