The Computer Language
24.11 Benchmarks Game

Node.js versus C# .NET 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
* C# .NET #5 2.27 29,584 1485 8.79
C# .NET #2 30.38 28,804 584 30.37
* C# .NET #9 8.40 29,608 1232 33.33
C# .NET #6 9.93 29,272 1075 39.49
C# .NET #3 11.01 29,020 1117 43.46
C# .NET #8 43.80 28,760 519 43.78
Node.js #5 11.05 101,616 1320 43.85
Node.js #8 58.06 51,484 452 58.05
n-body
source secs mem gz cpu secs
* C# .NET #9 3.17 28,604 2480 3.17
* C# .NET #4 3.75 28,504 2137 3.75
* C# .NET #7 4.80 28,564 1715 4.80
* C# .NET #6 4.83 28,512 1754 4.83
C# .NET #3 6.65 29,280 1311 6.64
C# .NET #2 6.89 29,284 1339 6.89
C# .NET #8 7.21 29,068 1335 7.21
C# .NET #0 7.66 29,360 1342 7.66
C# .NET 7.66 29,380 1424 7.66
Node.js #6 8.55 54,100 1274 8.56
Node.js #8 9.58 53,716 1173 9.59
spectral-norm
source secs mem gz cpu secs
* C# .NET #5 0.94 33,752 776 3.42
Node.js #7 5.36 53,724 420 5.37
Node.js 5.37 54,808 326 5.39
C# .NET #8 5.41 29,720 441 5.40
C# .NET #2 1.52 29,864 1084 5.78
C# .NET #3 1.54 31,460 890 5.80
Node.js #6 1.56 107,280 1002 5.99
Node.js #8 6.49 54,632 355 6.50
mandelbrot
source secs mem gz cpu secs
* C# .NET #7 3.21 66,484 915 12.50
* C# .NET 3.93 64,440 1980 15.41
* C# .NET #9 3.93 64,332 822 15.45
Node.js #3 4.00 135,476 1128 15.83
C# .NET #5 4.06 63,344 851 15.87
C# .NET #8 26.41 29,820 492 26.41
C# .NET #3 6.79 61,964 722 26.79
Node.js #2 29.36 61,144 422 29.39
C# .NET #2 46.19 29,604 504 46.19
Node.js 70.55 55,900 380 70.64
Node.js #8 72.49 56,116 412 72.52
fasta
source secs mem gz cpu secs
C# .NET #9 1.21 29,432 1512 1.21
C# .NET #8 5.40 32,864 904 5.42
C# .NET #5 1.48 50,620 1702 5.45
C# .NET 1.70 36,636 2113 6.23
* Node.js #5 2.52 112,392 2050 7.08
Node.js #8 18.42 61,784 742 18.61
Node.js 38.40 58,880 815 38.77
k-nucleotide
source secs mem gz cpu secs
C# .NET 3.18 181,724 2046 10.77
C# .NET #6 5.63 180,500 1615 14.88
C# .NET #4 12.06 612,408 1725 42.10
C# .NET #7 42.74 613,184 1449 43.35
Node.js #3 16.48 436,784 1817 44.54
C# .NET #8 75.50 1,371,044 736 76.56
Node.js #2 38.24 486,844 941 112.58
Node.js 39.98 356,716 1011 117.63
Node.js #8   Bad Output  
reverse-complement
source secs mem gz cpu secs
C# .NET #9 0.59 733,932 2641 1.37
C# .NET 3.14 583,252 1130 3.18
C# .NET #6 1.55 1,027,196 1627 3.76
C# .NET #5 2.53 1,025,008 1620 3.83
C# .NET #7 1.54 927,984 1312 4.25
C# .NET #3 8.47 1,380,908 934 13.21
* Node.js #2 15.44 731,804 1228 16.09
* Node.js #7   Bad Output  
binary-trees
source secs mem gz cpu secs
C# .NET #8 13.50 883,524 601 15.31
C# .NET #7 5.34 1,074,228 706 17.42
C# .NET #2 5.37 1,083,480 717 17.60
C# .NET 6.11 3,178,448 668 19.93
C# .NET #3 6.45 2,900,008 688 20.33
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
C# .NET #6   Make Error  
pidigits
source secs mem gz cpu secs
* C# .NET #6 0.82 30,744 1182 0.82
* C# .NET #5 0.84 33,264 990 0.88
Node.js #4 1.11 59,620 487 1.14
* C# .NET #4 1.29 31,392 1135 1.29
C# .NET #7 7.15 38,160 579 7.25
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
C# .NET #2 1.36 402,516 1881 2.60
C# .NET 4.60 599,212 641 4.83
C# .NET #5 1.74 614,536 679 5.02
Node.js #3 4.27 796,080 675 5.30
Node.js #4 5.41 978,952 471 5.56
C# .NET #4 8.65 854,996 854 29.97
Node.js

v23.0.0

C# .NET

.NET SDK 9.0.100
Host Version: 9.0.0
Commit: 9d5a6a9aa4

<OutputType>Exe
<TargetFramework>net9.0
<ImplicitUsings>enable
<Nullable>enable
<AllowUnsafeBlocks>true
<ServerGarbageCollection>true
<ConcurrentGarbageCollection>true
<PublishAot>false