I just write an example for working on list and parallel on Numba as bellow by Parallel and No Parallel:
Parallel
@njit(parallel=True)
def evaluate():
n = 1000000
a = [0]*n
sum = 0
for i in prange(n):
a[i] = i*i
for i in prange(n):
sum += a[i]
return sum
No parallel
def evaluate2():
n = 1000000
a = [0]*n
sum = 0
for i in range(n):
a[i] = i*i
for i in range(n):
sum += a[i]
return sum
and compare the time of evaluation
t.tic()
print(evaluate())
t.toc()
result: 333332833333500000 Elapsed time is 0.233338 seconds.
t.tic()
print(evaluate2())
t.toc()
result: 333332833333500000 Elapsed time is 0.195136 seconds.