Alan G Isaac skrev:
> http://article.gmane.org/gmane.comp.python.general/630847
>   

Yes, but here you still have to look up the name 'f' from locals in each 
iteration. map is written in C, once it has as PyObject* to the callable 
it does not need to look up the name anymore. The dictionary lookup(s) 
to get the callable is done just once. map is also more thread-safe. 
During the iteration another thread could rebind the name of the 
callable, but map is impervious to that.

S.M.



_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to