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.52 637,380 929 31.89 75% 80% 77% 72%
C# .NET Core 14.90 1,492,752 673 48.69 83% 79% 73% 93%
pidigits
source secs mem gz cpu cpu load
Java 3.13 37,324 938 3.35 98% 5% 3% 3%
C# .NET Core 3.06 36,204 1121 3.06 98% 1% 2% 3%
fannkuch-redux
source secs mem gz cpu cpu load
Java 17.91 31,560 1282 70.25 99% 98% 99% 97%
C# .NET Core 17.47 33,448 1068 69.43 100% 99% 99% 100%
n-body
source secs mem gz cpu cpu load
Java 22.00 32,496 1489 22.07 1% 100% 0% 1%
C# .NET Core 21.40 36,048 1542 21.40 100% 0% 1% 0%
spectral-norm
source secs mem gz cpu cpu load
Java 4.27 32,960 950 16.41 95% 97% 98% 96%
C# .NET Core 4.07 35,300 878 15.84 97% 98% 99% 97%
binary-trees
source secs mem gz cpu cpu load
Java 8.28 982,224 835 27.19 79% 86% 83% 83%
C# .NET Core 7.81 804,268 810 26.27 91% 80% 83% 84%
fasta
source secs mem gz cpu cpu load
Java 2.32 42,556 2473 6.24 73% 85% 49% 63%
C# .NET Core 2.15 68,048 2098 7.97 90% 95% 95% 91%
reverse-complement
source secs mem gz cpu cpu load
Java 3.31 626,956 2183 7.44 56% 60% 83% 45%
C# .NET Core 2.98 1,035,064 1621 7.18 74% 77% 36% 56%
mandelbrot
source secs mem gz cpu cpu load
Java 6.96 76,748 796 27.07 98% 98% 96% 98%
C# .NET Core 5.86 66,856 794 22.99 99% 98% 98% 99%
k-nucleotide
source secs mem gz cpu cpu load
Java 8.66 385,768 1812 26.52 76% 81% 74% 76%
C# .NET Core 5.58 187,032 2574 18.81 70% 93% 81% 95%
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.1.402
Commit: 3599f217f4
Host 2.1.4
<ServerGarbageCollection>true
<ConcurrentGarbageCollection>true