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 11.12 32,008 1225 44.12 99% 99% 99% 99%
C++ g++ 10.70 1,864 980 42.31 96% 100% 100% 100%
spectral-norm
source secs mem gz busy cpu load
C# .NET Core 2.13 36,024 764 8.11 93% 98% 95% 93%
C++ g++ 1.98 2,320 1044 7.90 99% 100% 99% 100%
pidigits
source secs mem gz busy cpu load
C# .NET Core 2.03 37,336 973 2.13 3% 1% 100% 0%
C++ g++ 1.89 4,460 513 1.95 2% 0% 100% 1%
fasta
source secs mem gz busy cpu load
C# .NET Core 1.66 79,592 1691 6.03 96% 88% 88% 91%
C++ g++ 1.46 2,180 2711 4.39 75% 75% 75% 75%
regex-redux
source secs mem gz busy cpu load
C# .NET Core 2.18 292,196 1869 4.28 23% 83% 43% 48%
C++ g++ 1.85 203,748 1315 4.44 48% 100% 43% 48%
binary-trees
source secs mem gz busy cpu load
C# .NET Core 5.59 905,364 753 20.01 92% 88% 87% 91%
C++ g++ 3.93 113,768 809 12.78 70% 81% 75% 98%
k-nucleotide
source secs mem gz busy cpu load
C# .NET Core 5.61 185,068 2044 18.05 77% 82% 70% 93%
C++ g++ 3.89 156,148 1631 11.99 94% 74% 70% 71%
reverse-complement
source secs mem gz busy cpu load
C# .NET Core 3.12 1,028,260 1621 7.66 75% 77% 53% 41%
C++ g++ 1.88 499,844 2093 1.93 100% 1% 2% 0%
n-body
source secs mem gz busy cpu load
C# .NET Core 21.75 34,648 1305 22.06 0% 41% 59% 1%
C++ g++ 7.70 1,772 1879 8.02 4% 0% 0% 100%
mandelbrot
source secs mem gz busy cpu load
C# .NET Core 5.54 65,288 816 21.79 98% 100% 98% 98%
C++ g++ 1.51 25,708 1791 6.01 99% 99% 99% 100%
C# .NET Core

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

C++ g++

g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008