Chapel VS Go benchmarks

Current benchmark data was generated on Sun Dec 01 2024, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -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

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 4.chpl 1950ms 11ms 66.4MB 1937ms 0ms chpl 1.31.0
chapel 3.chpl 2095ms 33ms 66.4MB 2087ms 3ms chpl 1.31.0
go 1-m.go 2710ms 23ms 43.6MB 5730ms 53ms go 1.23.3
go 1.go 3491ms 59ms 52.2MB 3473ms 3ms tinygo 0.34.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 4.chpl 193ms 3.0ms 36.4MB 183ms 7ms chpl 1.31.0
chapel 3.chpl 205ms 18ms 34.3MB 190ms 3ms chpl 1.31.0
go 1.go 229ms 5.1ms 5.6MB 213ms 0ms tinygo 0.34.0
go 1-m.go 238ms 2.0ms 8.2MB 400ms 7ms go 1.23.3

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 475ms 53ms 15.6MB 1840ms 0ms go 1.23.3
go 1.go 1414ms 6.0ms 256.2MB 1393ms 7ms tinygo 0.34.0
chapel 1-m.chpl 2252ms 19ms 555.7MB 4367ms 70ms chpl 1.31.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 40ms 5.4ms 7.5MB 123ms 0ms go 1.23.3
chapel 1-m.chpl 196ms 3.7ms 508.7MB 307ms 43ms chpl 1.31.0
go 1.go 257ms 2.0ms 66.7MB 240ms 0ms tinygo 0.34.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 80ms 1.0ms 36.4MB 73ms 0ms chpl 1.31.0
go 1.go 119ms 0.4ms 8.4MB 110ms 0ms go 1.23.3

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 36ms 1.0ms 8.3MB 27ms 0ms go 1.23.3
chapel 1.chpl 41ms 1.3ms 34.4MB 30ms 7ms chpl 1.31.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 128ms 0.9ms 5.4MB 397ms 3ms go 1.23.3
chapel 5-m.chpl 130ms 27ms 32.4MB 217ms 0ms chpl 1.31.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 18ms 0.2ms 5.5MB 37ms 0ms go 1.23.3
chapel 5.chpl 29ms 0.1ms 32.4MB 27ms 0ms chpl 1.31.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 0.7ms 0.3ms 0.1MB 0ms 0ms tinygo 0.34.0
go 1.go 1.5ms 0.1ms 3.4MB 0ms 0ms go 1.23.3
chapel 1.chpl 16ms 0.7ms 32.8MB 7ms 3ms chpl 1.31.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 760ms 11ms 91.1MB 1427ms 7ms chpl 1.31.0
go 7-m.go 794ms 3.9ms 40.6MB 2797ms 37ms go 1.23.3

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 122ms 1.7ms 92.9MB 200ms 7ms chpl 1.31.0
go 7-m.go 147ms 0.5ms 25.9MB 380ms 27ms go 1.23.3

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 334ms 4.0ms 32.8MB 317ms 7ms chpl 1.31.0
go 1.go 344ms 0.4ms 0.1MB 337ms 0ms tinygo 0.34.0
go 1.go 361ms 1.5ms 3.4MB 347ms 0ms go 1.23.3

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 38ms 0.6ms 0.1MB 30ms 0ms tinygo 0.34.0
go 1.go 40ms 1.0ms 3.4MB 30ms 0ms go 1.23.3
chapel 2.chpl 52ms 0.2ms 32.8MB 40ms 0ms chpl 1.31.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 452ms 1.7ms 32.4MB 440ms 3ms chpl 1.31.0
go 8.go 1129ms 4.6ms 8.4MB 1110ms 7ms go 1.23.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 121ms 1.7ms 34.4MB 117ms 3ms chpl 1.31.0
go 8.go 272ms 4.4ms 8.4MB 263ms 0ms go 1.23.3

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1395ms 6.8ms 224.1MB 1333ms 53ms chpl 1.31.0
go 3.go timeout 0.0ms 122.2MB 4977ms 47ms go 1.23.3
go 3.go timeout 0.0ms 104.3MB 4980ms 3ms tinygo 0.34.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 170ms 2.9ms 53.0MB 143ms 20ms chpl 1.31.0
go 3.go 1824ms 69ms 20.0MB 1810ms 20ms go 1.23.3
go 3.go 2414ms 11ms 29.9MB 2403ms 0ms tinygo 0.34.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 0-ffi.go 141ms 1.8ms 13.5MB 130ms 3ms go 1.23.3
chapel 1.chpl 1235ms 79ms 33.1MB 1227ms 3ms chpl 1.31.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 0-ffi.go 47ms 0.4ms 12.0MB 37ms 0ms go 1.23.3
chapel 1.chpl 313ms 1.6ms 33.1MB 300ms 7ms chpl 1.31.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 1907ms 17ms 5.4MB 7330ms 10ms go 1.23.3
chapel 1-m.chpl 1933ms 21ms 33.0MB 3823ms 0ms chpl 1.31.0
go 1.go 3680ms 35ms 5.4MB 3673ms 0ms go 1.23.3
chapel 1.chpl 3709ms 10.0ms 32.8MB 3703ms 0ms chpl 1.31.0
go 1.go timeout 0.0ms 0.5MB 4990ms 0ms tinygo 0.34.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 479ms 0.2ms 5.5MB 1817ms 3ms go 1.23.3
chapel 1-m.chpl 496ms 1.0ms 32.8MB 960ms 0ms chpl 1.31.0
go 1.go 934ms 5.6ms 3.4MB 927ms 0ms go 1.23.3
chapel 1.chpl 946ms 5.3ms 32.8MB 937ms 7ms chpl 1.31.0
go 1.go 1390ms 1.4ms 0.4MB 1380ms 0ms tinygo 0.34.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 126ms 0.7ms 5.4MB 447ms 0ms go 1.23.3
chapel 1-m.chpl 140ms 0.3ms 32.9MB 243ms 3ms chpl 1.31.0
go 1.go 234ms 4.3ms 3.4MB 223ms 0ms go 1.23.3
chapel 1.chpl 257ms 3.3ms 32.8MB 247ms 0ms chpl 1.31.0
go 1.go 349ms 0.1ms 0.3MB 340ms 0ms tinygo 0.34.0