All Go benchmarks

Current benchmark data was generated on Fri Jul 01 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz (Model 85)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

binarytrees

Input: 18

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 3959ms 20ms 45.3MB 5710ms 70ms go 1.18.3
1.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 338ms 4.4ms 8.2MB 397ms 7ms go 1.18.3
1.go 517ms 5.0ms 6.6MB 500ms 0ms tinygo 0.23.0

coro-prime-sieve

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1-m.go 1567ms 308ms 13.5MB 2900ms 10ms go 1.18.3
1.go 2357ms 27ms 253.6MB 2267ms 70ms tinygo 0.23.0

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1-m.go 80ms 13ms 5.4MB 137ms 0ms go 1.18.3
1.go 317ms 4.0ms 64.5MB 283ms 17ms tinygo 0.23.0

edigits

Input: 250001

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 200ms 2.9ms 11.7MB 190ms 3ms go 1.18.3

Input: 100000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 58ms 3.5ms 8.1MB 47ms 0ms go 1.18.3

fannkuch-redux

Input: 11

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3-m.go 1484ms 3.2ms 2.9MB 2850ms 7ms go 1.18.3
3.go 3451ms 10.0ms 50.1MB 3423ms 17ms tinygo 0.23.0

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3-m.go 152ms 0.9ms 4.9MB 227ms 3ms go 1.18.3
3.go 386ms 2.9ms 48.8MB 357ms 10ms tinygo 0.23.0

fasta

Input: 2500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3-m.go 258ms 3.5ms 2.9MB 463ms 0ms go 1.18.3

Input: 250000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.go 33ms 0.8ms 2.9MB 40ms 0ms go 1.18.3

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 0.9ms 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0
1.go 4.5ms 2.2ms 2.8MB 0ms 0ms go 1.18.3

http-server

Input: 3000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1-http2.go 240ms 23ms 58.1MB 350ms 67ms go 1.18.3
1-m.go 763ms 87ms 174.3MB 757ms 490ms go 1.18.3
2.go 793ms 92ms 165.4MB 633ms 467ms go 1.18.3

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1-http2.go 40ms 25ms 23.4MB 60ms 10ms go 1.18.3
2.go 146ms 6.8ms 35.9MB 93ms 73ms go 1.18.3
1.go 152ms 22ms 38.8MB 93ms 77ms go 1.18.3

json-serde

Input: sample 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-ffi.go 111ms 1.4ms 46.9MB 90ms 20ms go 1.18.3
1.go 219ms 2.0ms 20.5MB 210ms 7ms go 1.18.3

Input: canada 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-ffi.go 584ms 11ms 167.0MB 527ms 253ms go 1.18.3
1.go 1336ms 34ms 111.4MB 1300ms 77ms go 1.18.3

knucleotide

Input: 2500000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
7-m.go 1723ms 63ms 41.3MB 3163ms 47ms go 1.18.3

Input: 250000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
7-m.go 274ms 8.1ms 22.4MB 423ms 20ms go 1.18.3

lru

Input: 1000 1000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.go 210ms 5.4ms 2.9MB 197ms 0ms go 1.18.3
3.go 230ms 24ms 2.0MB 217ms 0ms tinygo 0.23.0

Input: 1000 3000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.go 604ms 11ms 2.9MB 590ms 0ms go 1.18.3
3.go 631ms 2.6ms 2.0MB 620ms 0ms tinygo 0.23.0

Input: 100 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.go 109ms 2.5ms 4.1MB 93ms 0ms go 1.18.3
3.go 111ms 6.3ms 0.0MB 100ms 0ms tinygo 0.23.0

mandelbrot

Input: 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 4715ms 6.8ms 5.3MB 4697ms 13ms go 1.18.3
1.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 196ms 3.0ms 4.9MB 183ms 0ms go 1.18.3
1.go 406ms 7.2ms 0.0MB 393ms 0ms tinygo 0.23.0

merkletrees

Input: 17

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 2569ms 11ms 48.2MB 3657ms 60ms go 1.18.3
2.go 2979ms 16ms 53.9MB 4280ms 70ms go 1.18.3
1.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0
2.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 554ms 10.0ms 12.3MB 757ms 20ms go 1.18.3
2.go 624ms 1.0ms 14.5MB 870ms 17ms go 1.18.3
1.go 1227ms 14ms 39.1MB 1203ms 10ms tinygo 0.23.0
2.go 1543ms 8.6ms 51.6MB 1517ms 10ms tinygo 0.23.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 625ms 9.4ms 2.8MB 613ms 0ms go 1.18.3
1.go 860ms 3.0ms 0.0MB 847ms 0ms tinygo 0.23.0

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 67ms 2.1ms 2.8MB 53ms 0ms go 1.18.3
1.go 93ms 2.7ms 2.0MB 83ms 0ms tinygo 0.23.0

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.go 948ms 6.9ms 17.1MB 933ms 0ms tinygo 0.23.0
1.go 1191ms 49ms 73.6MB 1153ms 23ms go 1.18.3
2.go 1237ms 14ms 20.2MB 1220ms 13ms go 1.18.3
1.go 1306ms 32ms 42.8MB 1283ms 3ms tinygo 0.23.0

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.go 147ms 4.7ms 22.0MB 130ms 3ms go 1.18.3
1.go 171ms 3.7ms 13.9MB 157ms 0ms tinygo 0.23.0
2.go 223ms 0.7ms 5.6MB 210ms 0ms tinygo 0.23.0
2.go 283ms 9.0ms 7.5MB 270ms 0ms go 1.18.3

pidigits

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8.go 1580ms 22ms 8.5MB 1553ms 10ms go 1.18.3

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8.go 375ms 5.3ms 8.5MB 357ms 0ms go 1.18.3

regex-redux

Input: 2500000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.go timeout 0.0ms 0.0MB 0ms 0ms go 1.18.3
3.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

Input: 250000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.go 2962ms 2.6ms 22.4MB 2953ms 33ms go 1.18.3
3.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

secp256k1

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-ffi.go 189ms 0.8ms 9.8MB 170ms 7ms go 1.18.3

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-ffi.go 62ms 1.9ms 9.5MB 47ms 0ms go 1.18.3

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4-m.go 2755ms 35ms 5.3MB 5270ms 13ms go 1.18.3
1.go timeout 0.0ms 0.0MB 0ms 0ms go 1.18.3
1.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4-m.go 712ms 5.8ms 2.8MB 1323ms 3ms go 1.18.3
1.go 1380ms 18ms 4.8MB 1367ms 0ms go 1.18.3
1.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.23.0

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4-m.go 188ms 7.5ms 2.8MB 327ms 0ms go 1.18.3
1.go 354ms 5.6ms 2.8MB 340ms 0ms go 1.18.3
1.go 1975ms 18ms 2.0MB 1960ms 0ms tinygo 0.23.0