Why Optimising Python is Hard (3): Tail Call Optimisation

The Idea of Tail Call Optimisation There is a famous family of numerical sequences, which can be built according to a very simple pattern. You start with an arbitrary positive integer as your first number in the sequence. Whenever your number is even, you divide it by two. Otherwise, you multiply it be three, and … Continue reading Why Optimising Python is Hard (3): Tail Call Optimisation

Why Optimising Python is Hard (2): Messing with Namespaces

We are on a quest to optimise Python programs. More specifically, we want to replace instances where builtin functions are called with known arguments, such as len(‘abc’), by the respective result (which would be 3 in this case). In order to succeed, we must make sure that the name len really refers to the built-in … Continue reading Why Optimising Python is Hard (2): Messing with Namespaces