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 28.74 32,016 1297 28.73 100% 0% 0% 1%
Ruby 723.69 8,916 1137 723.48 25% 86% 1% 9%
mandelbrot
source secs mem gz cpu cpu load
Node.js 19.04 311,404 778 67.84 82% 96% 83% 97%
Ruby 463.95 69,656 1019 1,852.06 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Node.js 9.79 35,012 1745 9.81 1% 0% 1% 100%
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
spectral-norm
source secs mem gz cpu cpu load
Node.js 16.17 31,288 368 16.17 100% 1% 1% 0%
Ruby 141.49 50,156 835 544.76 96% 97% 96% 97%
fannkuch-redux
source secs mem gz cpu cpu load
Node.js 81.49 29,880 473 81.46 100% 1% 1% 0%
Ruby 710.58 33,348 1426 2,761.73 99% 99% 95% 97%
regex-redux
source secs mem gz cpu cpu load
Node.js 4.44 511,916 452 4.45 0% 87% 2% 14%
Ruby 28.80 309,760 424 28.77 15% 48% 20% 19%
k-nucleotide
source secs mem gz cpu cpu load
Node.js 66.07 76,980 904 152.53 96% 77% 78% 77%
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
binary-trees
source secs mem gz cpu cpu load
Node.js 53.64 918,808 440 55.05 68% 2% 5% 30%
Ruby 54.24 510,868 1078 153.99 73% 98% 67% 72%
reverse-complement
source secs mem gz cpu cpu load
Node.js 4.30 243,956 1088 4.63 5% 93% 7% 3%
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
pidigits
source secs mem gz cpu cpu load
Node.js   Bad Output
Ruby 0.20 ? 478 0.20 0% 0% 0% 100%
Node.js

v8.4.0

Ruby

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