4 ms·
These 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 a
by ktpsns 7y ago
These 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.