Efficient System.arraycopy on multidimensional arrays

后端 未结 5 426
花落未央
花落未央 2020-12-16 02:34

I\'m aware that a common performance refactoring is to replace simple for\'s by System.arraycopy.

I want to ask about:

  1. Whe

5条回答
  •  佛祖请我去吃肉
    2020-12-16 02:44

    AFAIK, System.arrayCopy is the most efficient and best way to copy your arrays. I am not aware of any situations where the alternate way of implementing your own loops would be much more efficient for direct copies.

提交回复
热议问题