3 ms·
Node is faster than Python 3
- enz 7y agoSince V8 engine is JITed, I guess it's expected, right?
- igouy 7y agoDepends what you've already seen. Meanwhile, pidigits: 13.48 Node js 3.34 Python 3 "Since V8 engine is JITed" was that expected?
- Tomte 7y agoReal title: "Node js versus Python 3 fastest programs". Don't editorialize titles, especially not with the intent to stir up language wars.
- ktpsns 7y agoThese kind of benchmarks and comparisons are pointless. If you want to solve the n-body problem or the Mandelbrot set, you'll never (solely!) choose languages as Node.js or Python 3 for doing so. You will choose something out of {C++,OpenCL,OMP,...} and probably want to use either Python or Node.js as glue language for steering the actual computing code ("kernels"). Therefore, a scripting language like Python/Node shall concentrate to do this kind of things well: Abstraction and high level coding. They both excel in doing so. And it's hard to do useful benchmarks for this kind of thing, because the same algorithm might not be useful for both languages.
- igouy 7y ago> … you'll never (solely!) choose languages as … You will choose something out of … That may be what you will choose to do. You do not know what other programmers will choose to do.
- ktpsns 7y agoSure. I have a HPC background, I get paid for not wasting CPU hours. Nobody prevents you from putting any Turing complete language beyond what it was originally done for. Python is by design not a language for number crunching. There exist great libraries like Numpy which turn it to an amazing steering machine for number crunching (which is however ultimately done in performant low level C/Fortran code). The same applies for basically any other scripting language.