The Computer Language
Benchmarks Game

C# .NET Core versus C++ g++ 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.

fannkuch-redux
source secs mem gz busy cpu load
C# .NET Core 8.27 30,316 1225 32.79 99% 99% 99% 99%
C++ g++ 7.92 1,700 980 30.88 100% 99% 98% 93%
pidigits
source secs mem gz busy cpu load
C# .NET Core 0.93 34,720 973 1.11 4% 5% 95% 14%
C++ g++ 0.89 4,236 513 0.89 0% 0% 100% 0%
spectral-norm
source secs mem gz busy cpu load
C# .NET Core 0.83 33,876 764 2.98 93% 89% 90% 88%
C++ g++ 0.72 2,348 1044 2.84 100% 99% 99% 99%
fasta
source secs mem gz busy cpu load
C# .NET Core 1.14 91,504 1691 4.21 93% 91% 90% 95%
C++ g++ 0.85 2,020 2711 3.13 92% 92% 92% 93%
regex-redux
source secs mem gz busy cpu load
C# .NET Core 1.43 330,072 1869 2.71 33% 39% 88% 30%
C++ g++ 1.03 275,752 2850 2.19 36% 37% 100% 40%
binary-trees
source secs mem gz busy cpu load
C# .NET Core 2.27 677,952 753 7.57 86% 81% 85% 83%
C++ g++ 1.53 112,820 1270 4.03 99% 59% 52% 53%
k-nucleotide
source secs mem gz busy cpu load
C# .NET Core 3.29 182,332 2044 11.02 85% 70% 94% 86%
C++ g++ 1.98 156,108 1631 5.92 96% 67% 68% 68%
n-body
source secs mem gz busy cpu load
C# .NET Core 6.89 32,456 1343 7.16 1% 3% 99% 1%
C++ g++ 3.94 1,604 1808 4.02 0% 1% 100% 1%
reverse-complement
source secs mem gz busy cpu load
C# .NET Core 1.60 1,028,352 1621 3.85 26% 43% 80% 92%
C++ g++ 0.63 499,668 2093 0.64 2% 0% 0% 100%
mandelbrot
source secs mem gz busy cpu load
C# .NET Core 3.19 61,264 816 12.41 97% 97% 98% 97%
C++ g++ 0.88 34,608 3542 3.47 98% 100% 98% 97%
C# .NET Core

.NET Core SDK 3.1.301
Host Version: 3.1.5; Commit: 65cd789777
<ServerGarbageCollection>true

C++ g++

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0