Suppose I have two Python functions, Function 1 and Function 2 .
Function 1 will call Function 2 , and the parameter will call big data (for example, a dictionary with 100 thousand elements).
I am wondering if there are performance differences between calling Function 2 in Function 1 , which means that I need to pass a large data parameter and implement Function 2 in Function 1 , which means I do not need to pass a large data parameter.
Thanks.
PS: I think the key question is how does Python pass a parameter, by value or by reference (pointer)?
Edit: This seems like a confusing issue. How to pass a variable by reference? - good answer.
source share