Arrays are pass-by-reference, so only the reference is copied to the function. The data in the array is not moved or copied at all. This means it costs the same no matter how big the array is.
On Monday, October 27, 2014 12:27:30 PM UTC+2, Nils Gudat wrote: > > Thanks for your answers. I was aware of the principle, but since I am > working on a problem in which my functions have to access only a couple of > values stored in fairly large Arrays, I was wondering whether there could > be situations in which it is too costly to pass the array to the function, > as lots of unecessary data is being passed as well? >
