The Computer Language
Benchmarks Game

C# .NET Core programs versus Java

by benchmark task performance

binary-trees
source secs mem gz cpu cpu load
C# .NET Core 7.08 784,864 851 23.45 82% 85% 83% 84%
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
reverse-complement
source secs mem gz cpu cpu load
C# .NET Core 0.80 311,100 1584 1.89 76% 57% 75% 36%
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
spectral-norm
source secs mem gz cpu cpu load
C# .NET Core 4.08 42,220 878 15.82 98% 97% 98% 98%
Java 4.29 29,884 950 16.56 96% 97% 99% 95%
mandelbrot
source secs mem gz cpu cpu load
C# .NET Core 6.76 73,848 672 26.66 99% 99% 100% 98%
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
fasta
source secs mem gz cpu cpu load
C# .NET Core 2.06 88,292 2087 7.81 94% 96% 98% 94%
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
pidigits
source secs mem gz cpu cpu load
C# .NET Core 3.04 40,536 1026 3.04 1% 100% 1% 0%
Java 3.06 31,760 938 3.16 6% 3% 97% 1%
n-body
source secs mem gz cpu cpu load
C# .NET Core 21.71 41,216 1305 21.70 1% 1% 100% 1%
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
fannkuch-redux
source secs mem gz cpu cpu load
C# .NET Core 16.97 42,404 1069 65.51 93% 97% 98% 100%
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
k-nucleotide
source secs mem gz cpu cpu load
C# .NET Core 13.76 217,804 1585 38.94 97% 80% 53% 55%
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
regex-redux
source secs mem gz cpu cpu load
C# .NET Core 31.64 1,613,456 673 111.19 84% 88% 92% 88%
Java 12.31 902,528 929 38.75 73% 76% 86% 81%
C# .NET Core

2.0.0-preview2-006497
"System.GC.Server": true

Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)