3 ms·
I am by no means an expert in CPython/V8 internals, but arguably Python is way more dynamic (e.g., dunder methods), performs way more runtime checks (whereas JS
by lou1306 2y ago
I am by no means an expert in CPython/V8 internals, but arguably Python is way more dynamic (e.g., dunder methods), performs way more runtime checks (whereas JS will happily keep on trucking if, say, you add a string to an integer), and its design makes it very hard to infer which value inhabits a variable at a given point in time (which you would need in order to apply optimizations to the bytecode). This kind of flexibility cannot come for free.
- Qem 2y agoSmalltalk and lisp are arguably even more dynamic and yet we have examples of faster runtimes for both.
- igouy 2y agoExcept Python is as fast as C when it is C and Python text functions quickly become C functions. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/pharo-python.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...