Go Versus C# benchmarks

Current benchmark data was generated on Sat Nov 27 2021, full log can be found HERE

CONTRIBUTIONS are WELCOME!

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
csharp 2.cs 1097ms 33ms 463.2MB 1640ms 243ms dotnet 6.0.100
csharp 1.cs 1555ms 17ms 338.7MB 1420ms 180ms dotnet 6.0.100
go 2.go 2288ms 38ms 70.9MB 4367ms 70ms go 1.17.3
csharp 1.cs 2380ms 11ms 108.3MB 2877ms 190ms mono 6.12.0
go 1.go 3013ms 7.1ms 43.0MB 4423ms 47ms go 1.17.3
go 1.go 4494ms 15ms 39.3MB 4477ms 3ms tinygo 0.21.0
go 2.go 4730ms 9.0ms 39.6MB 4703ms 13ms tinygo 0.21.0

Input: 14

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 2.go 76ms 8.3ms 8.2MB 127ms 0ms go 1.17.3
csharp 1.cs 101ms 22ms 37.9MB 67ms 13ms mono 6.12.0
go 1.go 114ms 2.7ms 8.3MB 123ms 0ms go 1.17.3
csharp 2.cs 125ms 12ms 43.1MB 150ms 3ms mono 6.12.0
csharp 2.cs 148ms 32ms 79.1MB 120ms 40ms dotnet 6.0.100
csharp 1.cs 175ms 29ms 77.6MB 113ms 20ms dotnet 6.0.100
go 1.go 176ms 1.2ms 3.1MB 167ms 0ms tinygo 0.21.0
go 2.go 217ms 0.8ms 3.6MB 207ms 0ms tinygo 0.21.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 1122ms 88ms 15.3MB 1770ms 23ms go 1.17.3
go 1.go 1773ms 1.5ms 253.6MB 1657ms 90ms tinygo 0.21.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 128ms 46ms 5.3MB 160ms 3ms go 1.17.3
go 1.go 291ms 10ms 65.9MB 257ms 10ms tinygo 0.21.0
csharp 1.cs 457ms 53ms 73.0MB 523ms 53ms dotnet 6.0.100

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 237ms 37ms 10.0MB 163ms 43ms go 1.17.3

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 93ms 4.2ms 9.9MB 43ms 20ms go 1.17.3
csharp 1.cs 939ms 28ms 46.1MB 860ms 33ms dotnet 6.0.100

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 3.go 1210ms 2.3ms 2.8MB 2330ms 0ms go 1.17.3
csharp 9.cs 1271ms 0.1ms 27.6MB 2413ms 0ms dotnet 6.0.100
go 3.go 3170ms 4.5ms 49.1MB 3143ms 13ms tinygo 0.21.0

Input: 10

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 3.go 125ms 2.7ms 4.8MB 183ms 0ms go 1.17.3
csharp 9.cs 176ms 31ms 28.1MB 223ms 7ms dotnet 6.0.100
go 3.go 348ms 0.9ms 48.6MB 323ms 10ms tinygo 0.21.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
csharp 5.cs 486ms 32ms 102.3MB 483ms 93ms dotnet 6.0.100
go 3.go 509ms 29ms 2.8MB 400ms 23ms go 1.17.3

Input: 250000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 3.go 51ms 4.2ms 3.3MB 40ms 0ms go 1.17.3
csharp 5.cs 129ms 27ms 40.2MB 83ms 27ms dotnet 6.0.100

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 1.4ms 0.3ms 0.2MB 0ms 0ms tinygo 0.21.0
go 1.go 3.3ms 2.1ms 2.7MB 0ms 0ms go 1.17.3
csharp 1.cs 30ms 9.1ms 23.9MB 10ms 2ms mono 6.12.0
csharp 1.cs 61ms 22ms 28.9MB 22ms 4ms dotnet 6.0.100

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 746ms 84ms 167.5MB 797ms 437ms go 1.17.3
csharp 2.cs 968ms 31ms 152.8MB 873ms 477ms dotnet 6.0.100
csharp 1.cs 1006ms 52ms 169.6MB 1033ms 470ms dotnet 6.0.100

Input: 500

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 153ms 7.6ms 40.5MB 93ms 77ms go 1.17.3
csharp 2.cs 597ms 80ms 79.5MB 487ms 130ms dotnet 6.0.100
csharp 1.cs 607ms 80ms 89.2MB 583ms 150ms dotnet 6.0.100

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 181ms 8.8ms 18.6MB 163ms 3ms go 1.17.3
csharp 2.cs 379ms 36ms 67.6MB 300ms 43ms dotnet 6.0.100
csharp 1.cs 695ms 97ms 144.8MB 620ms 47ms dotnet 6.0.100

Input: canada 15

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 1041ms 4.3ms 116.7MB 1013ms 50ms go 1.17.3
csharp 2.cs 2083ms 15ms 282.7MB 2153ms 113ms dotnet 6.0.100
csharp 1.cs 3335ms 32ms 798.7MB 3243ms 380ms dotnet 6.0.100

mandelbrot

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
csharp 9.cs 1648ms 3.0ms 44.8MB 3123ms 13ms dotnet 6.0.100
go 1.go 2213ms 3.9ms 11.8MB 4333ms 0ms go 1.17.3

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 43ms 2.4ms 3.5MB 70ms 0ms go 1.17.3
csharp 9.cs 122ms 37ms 34.6MB 100ms 3ms dotnet 6.0.100

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 509ms 0.9ms 0.0MB 500ms 0ms tinygo 0.21.0
go 1.go 528ms 1.6ms 2.8MB 517ms 0ms go 1.17.3
csharp 8.cs 594ms 2.8ms 27.3MB 563ms 0ms dotnet 6.0.100
csharp 8.cs 1228ms 9.9ms 26.4MB 1217ms 0ms mono 6.12.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 52ms 0.8ms 0.0MB 43ms 0ms tinygo 0.21.0
go 1.go 57ms 0.7ms 2.8MB 50ms 0ms go 1.17.3
csharp 8.cs 110ms 4.1ms 29.1MB 83ms 0ms dotnet 6.0.100
csharp 8.cs 146ms 3.7ms 25.4MB 133ms 0ms mono 6.12.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 12ms 1.0ms 2.0MB 0ms 0ms tinygo 0.21.0
go 1.go 14ms 2.6ms 2.8MB 10ms 0ms go 1.17.3
csharp 8.cs 58ms 16ms 25.1MB 33ms 3ms mono 6.12.0
csharp 8.cs 84ms 30ms 25.2MB 33ms 10ms dotnet 6.0.100

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 2.go 675ms 3.8ms 17.6MB 660ms 0ms tinygo 0.21.0
go 1.go 844ms 9.5ms 73.4MB 813ms 20ms go 1.17.3
go 1.go 881ms 14ms 43.1MB 857ms 7ms tinygo 0.21.0
go 2.go 971ms 0.4ms 22.3MB 963ms 3ms go 1.17.3
csharp 2.cs 2711ms 3.5ms 36.1MB 2670ms 10ms dotnet 6.0.100

Input: 10

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 1.go 117ms 1.5ms 21.7MB 100ms 3ms go 1.17.3
go 1.go 133ms 0.7ms 13.6MB 120ms 0ms tinygo 0.21.0
go 2.go 157ms 0.6ms 5.6MB 150ms 0ms tinygo 0.21.0
go 2.go 231ms 5.4ms 7.6MB 217ms 0ms go 1.17.3
csharp 2.cs 594ms 35ms 31.7MB 547ms 3ms dotnet 6.0.100
csharp 1.cs 617ms 35ms 45.7MB 567ms 17ms dotnet 6.0.100
csharp 1.cs 771ms 16ms 40.6MB 743ms 7ms mono 6.12.0
csharp 2.cs 2481ms 16ms 25.8MB 2457ms 3ms mono 6.12.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 8.go 1254ms 0.8ms 8.5MB 1243ms 0ms go 1.17.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 8.go 297ms 0.4ms 8.5MB 290ms 0ms go 1.17.3
csharp 1.cs 1641ms 312ms 79.5MB 1290ms 67ms dotnet 6.0.100

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 8.go 26ms 3.8ms 8.3MB 13ms 0ms go 1.17.3
csharp 1.cs 205ms 22ms 73.5MB 90ms 47ms dotnet 6.0.100

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 4.go 2237ms 3.5ms 4.8MB 4297ms 3ms go 1.17.3
csharp 3.cs 2682ms 406ms 30.2MB 4510ms 10ms dotnet 6.0.100

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 4.go 583ms 7.2ms 4.8MB 1070ms 0ms go 1.17.3
csharp 3.cs 651ms 6.2ms 28.4MB 1163ms 3ms dotnet 6.0.100
csharp 3.cs 2661ms 114ms 28.4MB 5037ms 10ms mono 6.12.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
go 4.go 52ms 4.9ms 4.8MB 63ms 0ms go 1.17.3
csharp 3.cs 125ms 37ms 29.8MB 113ms 7ms dotnet 6.0.100
csharp 3.cs 209ms 13ms 29.6MB 327ms 10ms mono 6.12.0
go 4.go 420ms 3.4ms 0.3MB 410ms 0ms tinygo 0.21.0