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 31.19 1,696,208 673 111.64 97% 89% 92% 80%
k-nucleotide
source secs mem gz cpu cpu load
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
C# .NET Core 12.37 231,336 2251 39.09 97% 70% 78% 72%
fannkuch-redux
source secs mem gz cpu cpu load
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
C# .NET Core 14.98 40,740 1091 57.67 97% 93% 99% 97%
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.71 39,848 1305 21.70 100% 0% 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 43,064 1026 3.03 3% 99% 1% 3%
fasta
source secs mem gz cpu cpu load
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
C# .NET Core 2.09 90,540 2087 7.85 94% 93% 97% 93%
mandelbrot
source secs mem gz cpu cpu load
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
C# .NET Core 6.78 74,348 672 26.69 100% 99% 98% 99%
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.05 42,828 878 15.80 99% 97% 97% 98%
reverse-complement
source secs mem gz cpu cpu load
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
C# .NET Core 0.79 307,604 1584 1.84 89% 75% 51% 24%
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.26 716,568 851 23.98 84% 82% 81% 87%
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

2.0.0 cdcd1928c9
"System.GC.Server": true