Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.arraycopy with multidimensional arrays?

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
US
i'm writing something that must clone a multidimensional array of bytes many times, and as such, efficiency is somewhat important in this part of the code.

is it somehow possible to use System.arraycopy with multidimensional arrays? and if so, is the performance better than using a nested for loop? are there any other methods which perform well? (I've heard that cloning and casting a multidimensional array of primitives is fairly slow, comparatively.)

Liam Morley
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."
 
I can't tell you if it's faster than loops or not, but System.arraycopy will indeed work on multi-dimensional arrays of primitives.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top