The Computer Language
Benchmarks Game

Node.js programs versus Ruby

by benchmark task performance

n-body
source secs mem gz cpu cpu load
Node.js 27.76 27,704 1297 27.76 100% 0% 1% 1%
Ruby 723.69 8,916 1137 723.48 25% 86% 1% 9%
mandelbrot
source secs mem gz cpu cpu load
Node.js 17.95 641,352 778 64.47 98% 82% 86% 95%
Ruby 463.95 69,656 1019 1,852.06 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Node.js 9.39 31,212 1745 9.40 100% 1% 1% 0%
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 78.16 26,632 473 78.13 100% 2% 3% 2%
Ruby 710.58 33,348 1426 2,761.73 99% 99% 95% 97%
spectral-norm
source secs mem gz cpu cpu load
Node.js 15.77 28,192 368 15.76 0% 1% 100% 0%
Ruby 141.49 50,156 835 544.76 96% 97% 96% 97%
regex-redux
source secs mem gz cpu cpu load
Node.js 4.15 448,996 452 4.15 42% 58% 1% 0%
Ruby 28.80 309,760 424 28.77 15% 48% 20% 19%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 62.09 2,089,424 904 152.72 82% 85% 95% 82%
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
reverse-complement
source secs mem gz cpu cpu load
Node.js 3.72 244,156 1088 3.99 1% 8% 3% 98%
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
binary-trees
source secs mem gz cpu cpu load
Node.js 51.21 931,768 440 51.98 57% 10% 30% 5%
Ruby 54.24 510,868 1078 153.99 73% 98% 67% 72%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
Ruby 0.20 ? 478 0.20 0% 0% 0% 100%
Node.js

v7.9.0

Ruby

ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]