Re:Why Python Is Slow: Looking Under the Hood (2014)
by foota on Thursday July 07, 2016 @09:10PM
(#12053064)
Python's fairly unique OO reflection like abilities make it fairly hard to do things other than with pointers for any sort of object interaction imo.
Re:Why Python Is Slow: Looking Under the Hood (2014)
by telotortium on Thursday July 07, 2016 @08:41PM
(#12052983)
Why Python, Ruby, and Javascript Are Slow: https://news.ycombinator.com/item?id=5304873
Re:Why Python Is Slow: Looking Under the Hood (2014)
by qznc on Friday July 08, 2016 @03:45AM
(#12054096)
That might be it. I remember it as an article. Maybe http://lukauskas.co.uk/articles/2014/02/13/why-your-python-r...
Python is slow because it is dynamically typed rather than statically typed? No. In most cases, type inference is good enough. See Javascript. Python is slow because it is interpreted rather than compiled? That is not really a limit in the long run. Insert a JIT compiler. Java was interpreted as well initially.
Python's object model can lead to inefficient memory access? No we are getting somewhere. Scripting languages in general tend to overuse hashmaps. That gives you a lot of flexibility and monkey patching. It is also a lot harder to optimize than dynamic dispatch.
Another problem of scripting languages is the inability to control your memory. Python forces you to make a lot of memory allocations and there is little control over the garbage collector. Even Java suffers from this, but the JVM engineers invested a lot to fix it. There are no value record types (struct) in Java.