Is Java's System.arraycopy() efficient for small arrays?

前端 未结 7 2002
独厮守ぢ
独厮守ぢ 2020-12-02 13:01

Is Java\'s System.arraycopy() efficient for small arrays, or does the fact that it\'s a native method make it likely to be substantially less efficient than a s

7条回答
  •  情深已故
    2020-12-02 13:28

    Native functions should be faster than JVM functions, since there is no VM overhead. However for a lot of(>1000) very small(len<10) arrays it might be slower.

提交回复
热议问题