3 ms·
You are right, the difficulties are in Python's design. See the Pyston blog "Why is Python slow". http://blog.kevmod.com/2016/07/why-is-python-slow/ http://blo
by mhneu 10y ago
You are right, the difficulties are in Python's design. See the Pyston blog "Why is Python slow".
http://blog.kevmod.com/2016/07/why-is-python-slow/ http://blog.kevmod.com/2016/07/why-is-python-slow/
That said, the Pyston guys knew what the problems were (dynamism in C runtime) and were making progress. This was the future of fast Python - JIT experts optimizing the runtime and feeding code and ideas back to CPython.
I think we will look back at this Pyston announcement as the turning point where people gave up on Python speed.
- coldtea 10y ago>You are right, the difficulties are in Python's design. Not anymore than there were in Javascript's design -- which is as, if not more, dynamic. It's just lack of funding. PyPy managed to get much faster than CPython, but doesn't have the funding or the blessing of being official (Javascript doesn't need it, since there were always multiple implementations).
- beagle3 10y agoJavascript does have it easier by virtue of being single threaded, with no overloading and with a single numeric type. In the python version of this loop: for x in range(1000): sum = sum + math.sin(x) The global "math" and "math.sin" can be changed by another thread at any point. Javascript guarantees that this cannot happen. Also, what constructs of Javascript are more dynamic than python? I can only think of "eval" and "with", both of which the JavaScript JIT decline to compile and interpret instead.