4 ms·
No, I don't know of anything in Python that could not be made as efficient as Javascript, using techniques that we already know about (and given the time and mo
by chrisseaton 10y ago
No, I don't know of anything in Python that could not be made as efficient as Javascript, using techniques that we already know about (and given the time and money that you've already acknowledged are also barriers).
I'm not considering Python's C extensions there. I don't know if you'd consider that part of the 'language' or 'ecosystem'. Pyston is trying to make Python fast, including the C extensions, which is not as easy.
- the_mitsuhiko 10y agoJavaScript has fewer problematic features than Python which makes it possible to write efficient implementations. Also it has a standard which Python does not.
- fovc 10y agoWhat are the problematic features in Python that are not in JS? I'm not as familiar with JS
- optimuspaul 10y agoWhat do you mean Python doesn't have a standard? There is a very mature standard and process for managing that standard.
- chrisseaton 10y agoThere isn't a document describing the semantics of Python is there? That's what people mean by a 'standard'. Something at least trying to be somewhat semi-formal. If you mean that the implementation of CPython is a standard, well then I suppose that's arguable, but it's really not what anyone means.
- ak217 10y agohttps://docs.python.org/3.5/reference/ https://docs.python.org/3.5/reference/ I'm not sure why Armin is so categorical, but perhaps one way to rephrase what he said is that ES6 has had more opportunity to flesh out the spec/edge cases than Python, due to Javascript's popularity and healthy competition between implementations.
- the_mitsuhiko 10y agoBecause I spent months of my life a few years ago trying to work on modernizing the Python interpreter and it made me a bitter person. There is so much bizarre behavior in the interpreter that people depend on which is entirely undocumented and non standardized. Very few people know what even such a simple thing as "a + b" does in the language.
- chrisseaton 10y agoThe question was about whether it is technically possible to create a Python as fast as JavaScript, ignoring the money needed. So the number of features doesn't matter, only whether or not they are all possible to implement efficiently, and the lack of a standard doesn't matter, as with infinite money you could test comprehensively.
- jstimpfle 10y agoNo need to disqualify the answer. The point of my question was of course to learn about aspects of Javascript-the-language that make it intrinsically easier to build a fast implementation for than building one for python. If there are just more difficult-to-implement features that is interesting as well (although it would be nice to know which ones).