3 ms·
Cpython deliberately chooses to prioritize simplicity, stability and easy C extensions over raw speed. If you run the benchmark in PyPy (the performance optimiz
by serjester 2y ago
Cpython deliberately chooses to prioritize simplicity, stability and easy C extensions over raw speed. If you run the benchmark in PyPy (the performance optimized implementation) it’d be 10X faster. You could argue anything that’s performance bottlenecked shouldn’t be implemented in Python in the first place and therefore C compatibility is critical.
- maccard 2y agoI don't have easy access to pypy so I can't run the benchmark on that I'm afraid. I'd love to see some relative results though. > You could argue anything that’s performance bottlenecked shouldn’t be implemented in Python in the first place and therefore C compatibility is critical. Honestly, I think I'm heading towards "python should only be used for glue where performance does not matter". The sheer amount of time lost to waiting for slow runtimes is often brought up with node and electron, but I ran the benchmark in node and it's about halfway between go and python.
- igouy 2y agoCPython 3.12.3 vs Node.js v22.2.0 https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-node.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- camdenreslink 2y agoNode isn't the slow part of electron. Node is actually pretty darn fast.
- pjmlp 2y agoIndeed, shipping a full browser is.