System.arrayCopy is slow
问题 I've been trying to measure the performance of the System.arrayCopy vs Arrays.copyOf in order to choose properly one of them. Just for the sake of benchmark I added manual copy as well and the result surprised me. Obviously I'm missing something really important, could you, please, tell me, what it is? The implementation is as follows (see first 4 methods). public class ArrayCopy { public static int[] createArray( int size ) { int[] array = new int[size]; Random r = new Random(); for ( int i