[PATCH] Performance bug in String(byte[],int,int,Charset)

Clemens Eisserer linuxhippy at gmail.com
Tue Jan 8 15:10:20 UTC 2008


Hello again,

> By the way, using clone() seams better than Arrays.copyOf() here.
>
> byte[] b = ba.clone();

Why? I remember that I've seen some benchmarks where array.clone() was
way slower than creating a new array and using System.arraycopy()
(which is exactly what copyOf does). However this may have changed ;)

lg Clemens



More information about the core-libs-dev mailing list