Get the latest tech news
Python performance myths and fairy tales
Antonio Cuni, who is a longtime Python performance engineer and PyPy developer, gave a presenta [...]
In Python, however, there is a long list of operations that have to be performed, starting with finding the type of p, calling its__getattribute__() method, through unboxing p.x and 2, to finally boxing the result, which requires memory allocation. That is a complex and error-prone process; he found situations where he was " unable to trigger optimizations in PyPy's compiler because the code was too complicated". Libraries often use patterns that rely on the dynamic nature of the language in order to make APIs " that end users can use nicely" so those features cannot simply be removed.
Or read this on Hacker News