3 ms·
I'm not fond of the habit of glossing over the slowness of the Python interpreter by pointing out that you can use it as an FFI to fast code. That's great if y
by samatman 6y ago
I'm not fond of the habit of glossing over the slowness of the Python interpreter by pointing out that you can use it as an FFI to fast code.
That's great if you're using Python for numerics, and color within the lines. But: a general purpose programming language is used for general purposes. Even for numerics, composability suffers if the language itself is slow, since crossing between FFI packages must be done very carefully to prevent paying the cost of the interpreter.
The fact is that Common Lisp, Julia, Swift, and LuaJIT (just to name a few), are substantially faster than Python, and it's not hard to come up with situations where this will matter. Worse, you might stumble into such a situation after committing to Python.
Python has much to recommend it. But its slowness has been mitigated, not addressed, in the years since Norvig wrote this article.
- Blikkentrekker 6y agoThe startup time of the Python interpreter in particular disqualifies it for many tasks one would otherwise use it for. It disqualifies it for instance for window management scripts for which it's latency is too high.
- neolog 6y agoI use a python window manager, it's great. http://docs.qtile.org/en/latest/ http://docs.qtile.org/en/latest/
- Blikkentrekker 6y agoIf the actual window manager be written in Python, one obviously does not face the startup issue. If one attempt to send E.W.M.H. to the window manager using Python scripts, then one is faced with that.
- gjvc 6y agoE.W.M.H. == https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints
- deleted 6y ago[deleted]
- cutler 6y agoYou ommitted Go. I think Go has the best chance of replacing Python in the long run as it is very similar to Python and is often used as a replacement. In time I think we might see Google implementing most of the Python numeric and scientific libraries in Go.
- dunefox 6y agoIf Go, not Julia, replaces Python it would be a joke.