The Computer Language
Benchmarks Game

Java programs versus C# .NET Core

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Java 12.31 902,528 929 38.75 73% 76% 86% 81%
C# .NET Core 30.79 1,401,756 856 106.34 92% 82% 80% 93%
k-nucleotide
source secs mem gz cpu cpu load
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
C# .NET Core 13.46 223,004 1585 37.90 73% 99% 55% 56%
fannkuch-redux
source secs mem gz cpu cpu load
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
C# .NET Core 18.93 41,332 1172 75.05 99% 100% 99% 99%
reverse-complement
source secs mem gz cpu cpu load
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
C# .NET Core 1.40 700,868 1670 2.22 19% 45% 63% 37%
mandelbrot
source secs mem gz cpu cpu load
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
C# .NET Core 8.27 80,888 839 32.68 99% 99% 100% 99%
n-body
source secs mem gz cpu cpu load
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
C# .NET Core 21.69 43,112 1305 21.68 1% 100% 1% 0%
pidigits
source secs mem gz cpu cpu load
Java 3.06 31,760 938 3.16 6% 3% 97% 1%
C# .NET Core 3.03 40,312 1026 3.03 99% 1% 1% 0%
fasta
source secs mem gz cpu cpu load
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
C# .NET Core 2.11 86,936 2087 7.95 92% 93% 96% 98%
spectral-norm
source secs mem gz cpu cpu load
Java 4.29 29,884 950 16.56 96% 97% 99% 95%
C# .NET Core 4.06 42,800 878 15.81 98% 98% 98% 97%
binary-trees
source secs mem gz cpu cpu load
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
C# .NET Core 7.40 684,584 780 24.34 86% 83% 81% 83%
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)

C# .NET Core

dotnet 1.0.1 005db40cd1
"System.GC.Server": true