Furthermore, Python’s abstraction hurts any optimizations regarding keeping the L1/L2 cache filled with the relevant data for the next computation. This comes from many factors, first being that Python objects are not laid out in the most optimal way in memory. This is a consequence of Python being a garbage collected language—memory is automatically allocated and freed when needed. This creates memory fragmentation that can hurt the transfers to the CPU caches. In addition, at no point is there an opportunity to change the layo...
Why python slow.
Share this highlighthttp://www.safaribooksonline.com/a/high-performance-python/16707/