Can I tell you guys something? Great. Thanks. You're so swell.
My name is Tom and I'm addicted to compilers. This is the precautionary tale of of how I got hooked.
I started learning Python towards the end of my high school education, around the ( CPython) 2.2/2.3 days. Back then, you couldn't use try/except/finally in the same way that you would in a language like Java i.e.:
try { fudd.killTheWabbit(new SpearAndMagicHelmet()); } catch (BugsBunnyException …
"I don't even know how CPython works."
He does know how to use the things that make CPython work ( ANSI C, Makefiles, etc.).
PyPy has a different set of tools: RPython, translate.py, metaprogramming, FFI.
Ruby is 3600x slower than Python on message-passing with a CPU-bound thread. They had a more extreme case of the same problem Python 3.3 had.
Ruby has a GIL.
He felt completely beat up and out of his league looking at the PyPy source. (I feel …
…working on an iBook. This is helpful for eBooks. He used Emscripten to compile CPython into JavaScript. This does not require jail breaking. See bit.ly/pyonbook (?).
PyCon 2014 and 2015 will be in Montreal. You'll need a passport.
bpython is an interactive shell. It only works on UNIXy systems. It looks gorgeous! It has syntax highlighting. It shows you all the callables on an object. It even shows you the docstrings, etc. It looks like Curses. You can jump …
In CPython, the global interpreter lock , or GIL , is a mutex that prevents multiple native threads from executing Python bytecodes at once. This lock is necessary mainly because CPython's memory management is not thread-safe. (However, since the GIL exists, other features have grown to depend on the guarantees that it enforces.) [...] The GIL is controversial because it prevents multithreaded CPython programs from taking full advantage of multiprocessor systems in certain …
" Vectorization" [according to him] means replacing CPython's eval-loop with a C function that does all the work for you. For instance, he suggests moving from list comprehensions to map where it makes sense.
Use multiprocessing.map to parallelize map.
He keeps plugging PyPy.
itertools.repeat(2, 100) repeats 2 over-and-over again, 100 times.
itertools.count(0) counts starting at 0.
In some cases, switching to itertools can get you most of the performance benefits that …