The Computer Language
22.01 Benchmarks Game

Python 3 versus Node js fastest programs

Always look at the source code. These are only the fastest programs.

If they are manually vectorized SIMD, does the host language matter? You might not be interested in the most optimised programs.

Look at "mandelbrot" or "spectral-norm" or other measurement tables. Look at the other programs. Choose which programs you want to compare.

regex-redux
source secs mem gz busy cpu load
Python 3 1.34 111,492 1403 2.62 36% 41% 32% 87%
Node js 5.06 1,161,276 668 6.14 91% 28% 1% 1%
pidigits
source secs mem gz busy cpu load
Python 3 1.16 11,700 567 1.19 1% 100% 1% 1%
Node js 1.14 40,328 599 1.20 1% 100% 1% 3%
reverse-complement
source secs mem gz busy cpu load
Python 3 6.62 1,005,400 814 10.00 3% 48% 72% 28%
Node js 2.59 1,543,324 1480 4.84 30% 43% 50% 65%
k-nucleotide
source secs mem gz busy cpu load
Python 3 46.31 246,576 1967 175.36 94% 95% 96% 94%
Node js 15.84 401,916 1812 44.36 79% 96% 60% 46%
binary-trees
source secs mem gz busy cpu load
Python 3 44.70 273,136 660 161.37 83% 90% 91% 97%
Node js 7.13 1,231,192 744 20.86 83% 67% 69% 74%
fasta
source secs mem gz busy cpu load
Python 3 36.90 836,484 1947 68.94 43% 10% 74% 60%
Node js 1.91 77,804 2047 6.21 78% 80% 86% 81%
fannkuch-redux
source secs mem gz busy cpu load
Python 3 341.45 45,548 950 1,347.78 100% 99% 96% 99%
Node js 11.31 70,112 1313 44.69 98% 99% 99% 99%
mandelbrot
source secs mem gz busy cpu load
Python 3 177.35 47,780 688 703.41 99% 99% 99% 99%
Node js 4.04 101,228 1122 15.90 99% 98% 98% 98%
n-body
source secs mem gz busy cpu load
Python 3 541.34 7,780 1196 544.06 0% 100% 0% 0%
Node js 8.42 39,284 1268 9.11 3% 100% 3% 2%
spectral-norm
source secs mem gz busy cpu load
Python 3 112.97 48,792 407 450.01 100% 100% 100% 100%
Node js 1.67 72,932 999 6.13 90% 90% 91% 95%
Python 3

Python 3.10.1

Node js

v17.3.0