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.15 740,308 851 23.70 85% 83% 82% 85%
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
spectral-norm
source secs mem gz cpu cpu load
C# .NET Core 4.04 40,956 878 15.80 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.79 74,336 672 26.78 99% 99% 99% 99%
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 85,804 2087 7.82 95% 95% 97% 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.01 39,292 1026 3.01 100% 0% 1% 1%
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.70 38,396 1305 21.69 0% 73% 28% 1%
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
reverse-complement
source secs mem gz cpu cpu load
C# .NET Core 1.39 752,804 1670 2.21 28% 64% 13% 61%
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
fannkuch-redux
source secs mem gz cpu cpu load
C# .NET Core 19.09 39,228 1172 75.64 100% 99% 100% 99%
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.45 219,468 1585 37.40 54% 52% 78% 97%
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
regex-redux
source secs mem gz cpu cpu load
C# .NET Core 30.01 1,634,216 856 104.34 88% 78% 92% 91%
Java 12.31 902,528 929 38.75 73% 76% 86% 81%
C# .NET Core

2.0.0-preview1-005977
"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)