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%
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%
pidigits
source secs mem gz cpu cpu load
C# .NET Core 3.07 37,344 1026 3.08 1% 100% 2% 0%
C++ g++ 1.89 4,272 513 1.89 1% 3% 100% 2%
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.42 1,704 1763 9.41 2% 100% 1% 0%
mandelbrot
source secs mem gz cpu cpu load
C# .NET Core 5.85 66,680 794 22.98 98% 98% 98% 100%
C++ g++ 1.81 29,072 1002 7.10 98% 98% 98% 100%
regex-redux
source secs mem gz cpu cpu load
C# .NET Core 14.85 1,507,620 673 48.81 79% 80% 78% 94%
C++ g++ 1.83 203,520 1315 4.41 50% 45% 100% 49%
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