TLDR: in cython, why (or when?) is iterating over a numpy array faster than iterating over a python list?

Generally: 
I've used Cython before and was able to get tremendous speed ups over naive python impl', 
However, figuring out what exactly needs to be done seems non-trivial.

Consider the following 3 implementations of a sum() function.
They reside in a cython file called 'cy' (obviously, there's np.sum(), but that's besides my point..)

Naive python:

```
def sum_naive(A):
   s = 0
   for a in A:
       s += a
   return s

```

Cython with a function that expects a python list:

```
def sum_list(A):
    cdef unsigned long s = 0
    for a in A:
        s += a
    return s

```

Cython with a function that expects a numpy array.

```
def sum_np(np.ndarray[np.int64_t, ndim=1] A):
    cdef unsigned long s = 0
    for a in A:
        s += a
    return s

```

I would expect that in terms of running time, **sum\_np < sum\_list < sum\_naive**, however, the following script demonstrates to the contrary (for completeness, I added np.sum() )

```
N = 1000000
v_np = np.array(range(N))
v_list = range(N)

%timeit cy.sum_naive(v_list)
%timeit cy.sum_naive(v_np)
%timeit cy.sum_list(v_list)
%timeit cy.sum_np(v_np)
%timeit v_np.sum()

```

with results:

```
In [18]: %timeit cyMatching.sum_naive(v_list)
100 loops, best of 3: 18.7 ms per loop

In [19]: %timeit cyMatching.sum_naive(v_np)
1 loops, best of 3: 389 ms per loop

In [20]: %timeit cyMatching.sum_list(v_list)
10 loops, best of 3: 82.9 ms per loop

In [21]: %timeit cyMatching.sum_np(v_np)
1 loops, best of 3: 1.14 s per loop

In [22]: %timeit v_np.sum()
1000 loops, best of 3: 659 us per loop

```

What's going on? 
Why is cython+numpy slow?

P.S.  

I do use  

#cython: boundscheck=False  

#cython: wraparound=False