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 1.42 344,184 1869 2.68 39% 29% 87% 34%
Java 5.58 656,192 929 17.84 83% 83% 80% 74%
spectral-norm
source secs mem gz busy cpu load
C# .NET Core 0.83 34,120 764 2.97 88% 90% 88% 93%
Java 1.66 38,280 950 6.36 97% 95% 96% 96%
k-nucleotide
source secs mem gz busy cpu load
C# .NET Core 3.29 182,572 2044 11.14 71% 94% 89% 85%
Java 4.88 409,508 1812 15.86 75% 88% 86% 77%
n-body
source secs mem gz busy cpu load
C# .NET Core 4.83 31,488 1742 4.82 99% 0% 0% 0%
Java 6.76 35,156 1489 6.83 1% 0% 100% 1%
mandelbrot
source secs mem gz busy cpu load
C# .NET Core 3.17 61,812 816 12.41 97% 98% 97% 99%
Java 4.15 70,040 796 16.34 98% 98% 99% 98%
fannkuch-redux
source secs mem gz busy cpu load
C# .NET Core 8.26 30,568 1225 32.77 99% 99% 99% 99%
Java 9.94 34,188 1282 39.21 99% 98% 99% 97%
binary-trees
source secs mem gz busy cpu load
C# .NET Core 2.26 781,936 753 7.48 78% 77% 87% 90%
Java 2.49 2,490,296 835 7.88 92% 75% 78% 72%
fasta
source secs mem gz busy cpu load
C# .NET Core 1.19 111,092 1691 4.38 96% 92% 91% 89%
Java 1.28 44,172 2473 4.17 83% 78% 88% 76%
reverse-complement
source secs mem gz busy cpu load
C# .NET Core 1.46 967,044 1310 4.17 41% 93% 96% 57%
Java 1.53 720,672 2183 3.57 52% 63% 59% 59%
pidigits
source secs mem gz busy cpu load
C# .NET Core 0.94 34,960 973 0.97 4% 3% 95% 1%
Java 0.94 35,604 764 0.99 1% 4% 3% 97%
C# .NET Core

.NET Core SDK 3.1.401
Host Version: 3.1.7; Commit: fcfdef8d6b
<ServerGarbageCollection>true

Java

openjdk 15 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)