When you pass an object as an argument to a function, the only thing that is copied is the handler of that object (the address in memory where the object is stored). The object itself is not cloned, so there is no extra cost when passing a large object as an argument.
If you pass a string, it is cloned, so in this case the length of the string is disturbing.
asiop
source share