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.26 30,568 1225 32.77 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.94 34,960 973 0.97 4% 3% 95% 1%
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 34,120 764 2.97 88% 90% 88% 93%
C++ g++ 0.72 2,348 1044 2.84 100% 99% 99% 99%
n-body
source secs mem gz busy cpu load
C# .NET Core 4.83 31,488 1742 4.82 99% 0% 0% 0%
C++ g++ 3.94 1,604 1808 4.02 0% 1% 100% 1%
regex-redux
source secs mem gz busy cpu load
C# .NET Core 1.42 344,184 1869 2.68 39% 29% 87% 34%
C++ g++ 1.03 275,752 2850 2.19 36% 37% 100% 40%
fasta
source secs mem gz busy cpu load
C# .NET Core 1.19 111,092 1691 4.38 96% 92% 91% 89%
C++ g++ 0.85 2,020 2711 3.13 92% 92% 92% 93%
k-nucleotide
source secs mem gz busy cpu load
C# .NET Core 3.29 182,572 2044 11.14 71% 94% 89% 85%
C++ g++ 1.98 156,108 1631 5.92 96% 67% 68% 68%
binary-trees
source secs mem gz busy cpu load
C# .NET Core 2.26 781,936 753 7.48 78% 77% 87% 90%
C++ g++ 1.16 200,288 890 4.19 89% 88% 87% 98%
reverse-complement
source secs mem gz busy cpu load
C# .NET Core 1.46 967,044 1310 4.17 41% 93% 96% 57%
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.17 61,812 816 12.41 97% 98% 97% 99%
C++ g++ 0.89 34,540 3542 3.47 98% 98% 97% 99%
C# .NET Core

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

C++ g++

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0