The Computer Language
24.11 Benchmarks Game

Node.js versus Erlang fastest performance

How the programs are written matters! Always look at the source code.

If the fastest programs are * hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more seconds, less gz source code.

fannkuch-redux
source secs mem gz cpu secs
Node.js #5 11.05 101,616 1320 43.85
Node.js #8 58.06 51,484 452 58.05
Erlang 65.58 55,108 1044 258.75
n-body
source secs mem gz cpu secs
Node.js #6 8.55 54,100 1274 8.56
Node.js #8 9.58 53,716 1173 9.59
Erlang #3 104.40 55,560 1405 104.46
spectral-norm
source secs mem gz cpu secs
Node.js #7 5.36 53,724 420 5.37
Node.js 5.37 54,808 326 5.39
Node.js #6 1.56 107,280 1002 5.99
Node.js #8 6.49 54,632 355 6.50
Erlang #2 10.87 67,448 753 42.57
Erlang 63.88 63,040 513 63.98
mandelbrot
source secs mem gz cpu secs
Node.js #3 4.00 135,476 1128 15.83
Node.js #2 29.36 61,144 422 29.39
Node.js 70.55 55,900 380 70.64
Node.js #8 72.49 56,116 412 72.52
Erlang #4 53.98 83,592 813 215.09
Erlang #3 56.99 84,792 798 227.25
Erlang   Bad Output  
Erlang #2   Bad Output  
fasta
source secs mem gz cpu secs
* Node.js #5 2.52 112,392 2050 7.08
Node.js #8 18.42 61,784 742 18.61
Erlang #2 19.29 55,904 1170 21.10
Node.js 38.40 58,880 815 38.77
Erlang 84.14 55,008 1045 170.84
k-nucleotide
source secs mem gz cpu secs
Node.js #3 16.48 436,784 1817 44.54
Node.js #2 38.24 486,844 941 112.58
Node.js 39.98 356,716 1011 117.63
Erlang   Timed Out  
Node.js #8   Bad Output  
Erlang #3   Timed Out  
reverse-complement
source secs mem gz cpu secs
* Node.js #2 15.44 731,804 1228 16.09
Erlang 1,593.45 2,180,832 1309 1,802.03
* Node.js #7   Bad Output  
Erlang #4   Timed Out  
Erlang #3   Timed Out  
binary-trees
source secs mem gz cpu secs
Erlang 10.90 482,520 426 11.11
Erlang #2 4.81 478,992 485 13.06
Node.js #7 16.02 1,070,260 458 28.26
Node.js #6 8.60 1,250,816 752 30.68
Node.js #8 19.86 1,334,104 521 32.74
Node.js 8.92 1,405,276 717 33.60
pidigits
source secs mem gz cpu secs
Node.js #4 1.11 59,620 487 1.14
Erlang 3.36 94,388 565 4.11
Erlang #3 3.15 68,836 568 4.20
Erlang #2 3.26 75,544 518 5.16
Node.js #2 12.16 87,228 405 12.19
Node.js #3 12.25 87,708 431 12.28
regex-redux
source secs mem gz cpu secs
Node.js #3 4.27 796,080 675 5.30
Node.js #4 5.41 978,952 471 5.56
Erlang #6 21.80 4,651,256 1055 41.89
Node.js

v23.0.0

Erlang

Erlang/OTP 27 [erts-15.0]
[source] [64-bit] [smp:4:4]
[ds:4:4:10] [async-threads:1] [jit:ns]