3 ms·
> JavaScript is also much more performant than Python This is not true. Some Javascript _implementations_ are definitely faster than some Python _implementatio
by untothebreach 14y ago
> JavaScript is also much more performant than Python
This is not true. Some Javascript _implementations_ are definitely faster than some Python _implementations_, but nothing about either language makes one inherently faster than the other.
And in the Brython case, the Python is being translated to Javascript, so it is getting the same benefits out of a fast, JIT-compiled implementation that Javascript normally gets.
- cousin_it 14y ago> nothing about either language makes one inherently faster than the other You can't make such a statement confidently unless you examine the specs of both languages. For example, Python integers promote to bigints automatically while JS numbers don't. For one more, in Python you can overload attribute access, while in JS you can't. Both of these are language features rather than implementation details, and both potentially affect performance. There are probably others.