[SciPy-User] Python benchmarks project

Sturla Molden sturla.molden at gmail.com
Wed Apr 8 14:04:08 EDT 2015


On 07/04/15 14:13, Todd wrote:

> For example, it used to be the case that list comprehensions were faster
> than for loops.

It still is the case because the attribute lookups are done only once in 
a list comprehension. The builtin function map is faster than a for loop 
for the same reason. You can come along way with just some common sence 
if you think about what your code does.


Sturla




More information about the SciPy-User mailing list