The Computer Language
Benchmarks Game

C# .NET Core versus C++ g++ fastest programs

by faster benchmark performance

reverse-complement
source secs mem gz cpu cpu load
C# .NET Core 2.99 1,035,748 1621 7.23 26% 52% 91% 76%
C++ g++ 2.93 980,716 2280 4.52 51% 23% 33% 51%
pidigits
source secs mem gz cpu cpu load
C# .NET Core 2.06 38,564 973 2.07 100% 1% 4% 1%
C++ g++ 1.89 4,380 513 1.88 2% 99% 4% 2%
regex-redux
source secs mem gz cpu cpu load
C# .NET Core 2.22 295,364 1869 4.20 24% 39% 32% 98%
C++ g++ 1.83 203,520 1315 4.41 50% 45% 100% 49%
k-nucleotide
source secs mem gz cpu cpu load
C# .NET Core 5.48 186,672 2574 18.26 93% 85% 91% 67%
C++ g++ 3.73 156,080 1624 11.60 75% 70% 72% 96%
fasta
source secs mem gz cpu cpu load
C# .NET Core 2.27 68,140 2098 8.40 94% 90% 92% 98%
C++ g++ 1.33 1,740 2711 4.29 81% 81% 81% 82%
fannkuch-redux
source secs mem gz cpu cpu load
C# .NET Core 17.46 34,728 1068 69.44 100% 99% 99% 100%
C++ g++ 10.12 1,852 980 39.95 100% 100% 96% 100%
spectral-norm
source secs mem gz cpu cpu load
C# .NET Core 4.07 35,988 878 15.85 97% 100% 97% 97%
C++ g++ 1.98 1,164 1044 7.87 99% 99% 99% 100%
binary-trees
source secs mem gz cpu cpu load
C# .NET Core 7.73 809,848 810 25.41 82% 89% 83% 79%
C++ g++ 3.68 119,052 809 11.93 98% 76% 77% 78%
n-body
source secs mem gz cpu cpu load
C# .NET Core 21.41 36,520 1542 21.41 28% 0% 1% 72%
C++ g++ 9.37 1,712 1808 9.37 0% 2% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
C# .NET Core 5.54 66,356 816 21.64 98% 98% 100% 98%
C++ g++ 1.51 25,640 1791 5.99 100% 100% 99% 99%
C# .NET Core

.NET Core SDK 2.2.100
Commit: 1249f08fed
Host 2.2.0
<ServerGarbageCollection>true
<ConcurrentGarbageCollection>true

C++ g++

g++ (Ubuntu 8.2.0-7ubuntu1) 8.2.0