After a little reading, I found that there are some differences in the ways of copying arrays in java. For my application, I have a recursive tree of nodes, each of which contains an array of 2d-board (8x8).
Using profiler testing, it is best to use the java.util.Arrays.copyOf (array) method, which uses the built-in System.arraycopy system.
Even so, I spend 80% of my time creating new arrays. If anyone has any ideas on how to speed this up, I would appreciate it. Perhaps moving to an array of 64 elements rather than 8x8 will be faster. I checked this soon.
Chris source share