The Computer Language
Benchmarks Game

Java versus C# .NET Core fastest programs

by faster benchmark performance

regex-redux
source secs mem gz cpu cpu load
Java 10.50 571,736 929 31.63 71% 73% 66% 92%
C# .NET Core 14.85 1,507,620 673 48.81 79% 80% 78% 94%
pidigits
source secs mem gz cpu cpu load
Java 3.13 37,376 938 3.35 1% 98% 4% 6%
C# .NET Core 3.07 37,344 1026 3.08 1% 100% 2% 0%
fasta
source secs mem gz cpu cpu load
Java 2.32 42,212 2473 6.30 65% 85% 47% 76%
C# .NET Core 2.27 68,140 2098 8.40 94% 90% 92% 98%
n-body
source secs mem gz cpu cpu load
Java 22.00 32,272 1489 22.07 1% 0% 0% 100%
C# .NET Core 21.41 36,520 1542 21.41 28% 0% 1% 72%
fannkuch-redux
source secs mem gz cpu cpu load
Java 17.98 31,180 1282 70.57 97% 99% 97% 99%
C# .NET Core 17.46 34,728 1068 69.44 100% 99% 99% 100%
spectral-norm
source secs mem gz cpu cpu load
Java 4.26 33,572 950 16.39 96% 96% 98% 95%
C# .NET Core 4.07 35,988 878 15.85 97% 100% 97% 97%
binary-trees
source secs mem gz cpu cpu load
Java 8.39 960,056 835 27.39 81% 85% 74% 90%
C# .NET Core 7.73 809,848 810 25.41 82% 89% 83% 79%
reverse-complement
source secs mem gz cpu cpu load
Java 3.32 609,712 2183 7.54 64% 44% 44% 76%
C# .NET Core 2.99 1,035,748 1621 7.23 26% 52% 91% 76%
mandelbrot
source secs mem gz cpu cpu load
Java 6.96 76,316 796 27.06 97% 97% 97% 97%
C# .NET Core 5.85 66,680 794 22.98 98% 98% 98% 100%
k-nucleotide
source secs mem gz cpu cpu load
Java 8.74 470,116 1812 27.12 71% 73% 93% 74%
C# .NET Core 5.48 186,672 2574 18.26 93% 85% 91% 67%
Java

openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

C# .NET Core

.NET Core SDK 2.2.100
Commit: 1249f08fed
Host 2.2.0
<ServerGarbageCollection>true
<ConcurrentGarbageCollection>true