The Computer Language
Benchmarks Game

C# .NET Core versus Java fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

regex-redux
source secs mem gz busy cpu load
C# .NET Core 2.18 292,196 1869 4.28 23% 83% 43% 48%
Java 10.13 644,456 929 31.05 73% 75% 91% 67%
spectral-norm
source secs mem gz busy cpu load
C# .NET Core 2.13 36,024 764 8.11 93% 98% 95% 93%
Java 4.14 36,456 950 16.16 97% 99% 98% 97%
k-nucleotide
source secs mem gz busy cpu load
C# .NET Core 5.61 185,068 2044 18.05 77% 82% 70% 93%
Java 9.08 404,688 1812 29.03 77% 77% 93% 73%
fannkuch-redux
source secs mem gz busy cpu load
C# .NET Core 11.12 32,008 1225 44.12 99% 99% 99% 99%
Java 17.89 33,352 1282 70.90 98% 100% 100% 99%
pidigits
source secs mem gz busy cpu load
C# .NET Core 2.03 37,336 973 2.13 3% 1% 100% 0%
Java 3.07 38,408 938 3.39 0% 8% 99% 3%
binary-trees
source secs mem gz busy cpu load
C# .NET Core 5.59 905,364 753 20.01 92% 88% 87% 91%
Java 8.25 964,656 835 27.65 79% 96% 76% 84%
fasta
source secs mem gz busy cpu load
C# .NET Core 1.66 79,592 1691 6.03 96% 88% 88% 91%
Java 2.23 43,292 2473 6.05 63% 48% 92% 68%
mandelbrot
source secs mem gz busy cpu load
C# .NET Core 5.54 65,288 816 21.79 98% 100% 98% 98%
Java 5.93 76,272 796 23.28 97% 99% 98% 98%
n-body
source secs mem gz busy cpu load
C# .NET Core 21.75 34,648 1305 22.06 0% 41% 59% 1%
Java 22.67 34,892 1429 23.01 1% 0% 0% 100%
reverse-complement
source secs mem gz busy cpu load
C# .NET Core 3.12 1,028,260 1621 7.66 75% 77% 53% 41%
Java 3.14 730,620 2183 7.02 72% 45% 51% 55%
C# .NET Core

.NET Core SDK 3.1.101
Host Version: 3.1.2; Commit: 916b5cba26
<ServerGarbageCollection>true
<ConcurrentGarbageCollection>true

Java

openjdk 14 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)