What is the expense of passing a list in Python?
<p>I have an iterative function, phi, that calls itself many times to return the correct result.</p>

<pre><code>def phi(n, primes, phis):
</code></pre>

<p>where primes is a list of primes, 1 &lt; n &lt; 10,000,000
and phis is a list of totient values over the same range of n. </p>

<p>Is it expensive computation-wise to do this in Python? My guess is it does not cost much as we are dealing with pointers in Python so all that will get passed is the pointer? However with this function even the POINTERS would get passed a lot (read: sh##load). Is that computationally expensive?</p>
