3 ms·
Here's one source on Python very obviously not matching Node.js's perf on a simple microbenchmark: https://jott.live/markdown/nodejs_vs_python_ https://jott.liv
by sterlind 2y ago
Here's one source on Python very obviously not matching Node.js's perf on a simple microbenchmark: https://jott.live/markdown/nodejs_vs_python_ https://jott.live/markdown/nodejs_vs_python_
CPython really is inherently less performant than V8. CPython, until very recently, didn't have a JIT at all. It compiles scripts to bytecode, then runs the bytecode in a giant case statement. It doesn't have a tracing profiler-guided optimizer or an exotic garbage collector. CPython is way, way simpler than V8, but it's consequently slower. It's just the consequence of Google putting centuries of developer-years into an engine.
You can't just claim Python is fast because Python's C libraries are fast. Those libraries are fast despite Python. Torch is extremely fast, but it's fast from C and Lua too. There's valid reasons to want to compute in your programming language. Python is, ironically, probably popular because its slow speed encouraged users to write blazing fast C libraries rather than even try writing native Python, vs. settling for middling performance as in Java or .NET.
I shouldn't have to get out my hammer and tongs when NumPy doesn't implement the operator I need. Why can't Python be fast like Julia?