mlists at juma.me.uk
Fri Sep 10 12:12:48 UTC 2010
The approach used for Arrays in Scala was changed in 2.8 and initially
java.lang.reflect.Array.get/set was used in certain cases. That was changed at
the end of last year after it was pointed out that the performance of those
methods was less than desirable.
The interesting conclusion from that thread was that a simple instanceof check
for each array type is faster than using java.lang.reflect.Array.get/set. Given
those results, is there a good reason for not replacing the existing native
methods with pure Java methods that simply use instanceof for each array type?
More information about the core-libs-dev