The Computer Language
Benchmarks Game

Python 3 versus Node js fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

regex-redux
source secs mem gz busy cpu load
Python 3 1.36 111,852 1403 2.64 32% 40% 33% 88%
Node js 4.82 1,150,424 668 5.90 10% 82% 1% 29%
pidigits
source secs mem gz busy cpu load
Python 3 1.28 12,024 567 1.29 0% 1% 100% 0%
Node js 1.31 36,792 599 1.33 1% 0% 99% 2%
k-nucleotide
source secs mem gz busy cpu load
Python 3 46.28 241,108 1967 176.42 94% 97% 95% 96%
Node js 15.82 396,716 1812 44.48 63% 47% 81% 90%
reverse-complement
source secs mem gz busy cpu load
Python 3 7.20 1,005,184 814 10.75 20% 53% 48% 29%
Node js 2.21 1,534,824 1480 4.62 53% 22% 65% 68%
binary-trees
source secs mem gz busy cpu load
Python 3 48.03 462,732 472 174.44 89% 97% 88% 89%
Node js 7.20 1,282,116 744 20.39 83% 70% 68% 63%
fasta
source secs mem gz busy cpu load
Python 3 37.32 846,264 1947 71.03 10% 67% 83% 30%
Node js 1.91 72,004 2047 6.18 81% 88% 78% 78%
fannkuch-redux
source secs mem gz busy cpu load
Python 3 352.29 12,232 950 1,392.10 97% 99% 100% 99%
Node js 11.38 65,452 1313 45.00 99% 99% 99% 99%
mandelbrot
source secs mem gz busy cpu load
Python 3 163.32 12,080 688 642.00 98% 98% 98% 98%
Node js 4.04 95,888 1122 15.91 100% 98% 98% 99%
n-body
source secs mem gz busy cpu load
Python 3 567.56 8,076 1196 570.95 0% 0% 0% 100%
Node js 8.60 36,000 1268 8.85 100% 2% 0% 1%
spectral-norm
source secs mem gz busy cpu load
Python 3 120.99 13,424 407 479.86 99% 99% 99% 99%
Node js 1.64 67,912 999 6.11 92% 93% 96% 92%
Python 3

Python 3.9.2

Node js

v16.8.0