I was surprised to see in the Java source that System.arraycopy is a native method.
Of course the reason is because it's faster. But what native tricks is the code able to employ that make it faster?
Why not just loop over the original array and copy each pointer to the new array - surely this isn't that slow and cumbersome?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…