in the language specs range vs xrange dict.keys vs .iterkeys int vs long array.array vs list Easier to implement Harder to use Clutter the language unnecessarily More complex to understand Not really Pythonic
in C as much as possible In [29]: In [31]: numbers = range(1000) % timeit [x*2 for x in numbers] import numpy as np numbers = np.arange(1000) % timeit numbers*2 10000 loops, best of 3: 47.1 µs per loop The slowest run took 17.59 times longer than the fastest. This could mean that an intermediate result is being cached. 1000000 loops, best of 3: 1.48 µs per loop
of PyPy: Abstractions for Free", EP 2017 https://speakerdeck.com/antocuni/the-joy-of-pypy-jit-abstractions-for-free (https://speakerdeck.com/antocuni/the-joy-of-pypy-jit-abstractions-for-free) https://www.youtube.com/watch?v=NQfpHQII2cU (https://www.youtube.com/watch?v=NQfpHQII2cU)
Future status (hopefully) Future status (hopefully) All C extensions will just work C code as fast as today, Python code super-fast The best of both worlds PyPy as the default choice for HPC My personal estimate: 6 months of work and we have a fast cpyext (let's talk about money :))