If you think Numpy is overkill, this should be really fast, because this code runs in pure C (map()
and __add__()
are both directly implemented in C):
a = [1.0,2.0,3.0]
b = [4.0,5.0,6.0]
c = map(float.__add__, a, b)
Or alternatively, if you don't know the types in the list:
import operator
c = map(operator.add, a, b)