Odin VS Go benchmarks

Current benchmark data was generated on Sat Jan 28 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

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

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 2.0ms 1.3ms 0.0MB 0ms 0ms tinygo 0.25.0
odin 1.odin 2.0ms 0.7ms 1.7MB 0ms 0ms odin 2023
go 1.go 2.6ms 0.5ms 2.9MB 0ms 0ms go 1.19.5

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1-m.odin 852ms 21ms 46.9MB 1477ms 43ms odin 2023
go 7-m.go 1512ms 45ms 38.5MB 2780ms 27ms go 1.19.5

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 173ms 1.9ms 29.8MB 220ms 20ms odin 2023
go 7-m.go 244ms 12ms 23.5MB 383ms 17ms go 1.19.5

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 167ms 3.1ms 2.0MB 160ms 0ms tinygo 0.25.0
go 3.go 174ms 2.3ms 3.4MB 163ms 0ms go 1.19.5
odin 1.odin 275ms 3.5ms 1.3MB 263ms 0ms odin 2023

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 494ms 6.0ms 0.3MB 483ms 0ms tinygo 0.25.0
go 3.go 518ms 5.6ms 3.4MB 503ms 0ms go 1.19.5
odin 1.odin 820ms 9.6ms 1.2MB 807ms 0ms odin 2023

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 83ms 2.9ms 0.0MB 70ms 0ms tinygo 0.25.0
go 3.go 94ms 2.2ms 3.9MB 80ms 0ms go 1.19.5
odin 1.odin 112ms 0.5ms 1.2MB 100ms 0ms odin 2023

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 1585ms 2.5ms 4.5MB 1570ms 0ms odin 2023
go 1.go 4375ms 2.3ms 5.4MB 4363ms 0ms go 1.19.5
go 1.go timeout 0.0ms 5.6MB 4983ms 0ms tinygo 0.25.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 68ms 0.3ms 1.3MB 60ms 0ms odin 2023
go 1.go 184ms 1.1ms 2.9MB 170ms 0ms go 1.19.5
go 1.go 247ms 4.1ms 0.0MB 237ms 0ms tinygo 0.25.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 458ms 2.3ms 2.9MB 443ms 0ms go 1.19.5
odin 1-i.odin 529ms 0.2ms 1.2MB 520ms 0ms odin 2023
go 1.go 843ms 1.9ms 0.0MB 830ms 0ms tinygo 0.25.0
odin 1.odin 2890ms 20ms 1.2MB 2877ms 0ms odin 2023

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 50ms 2.0ms 2.9MB 40ms 0ms go 1.19.5
odin 1-i.odin 56ms 2.3ms 1.2MB 50ms 0ms odin 2023
go 1.go 87ms 1.1ms 0.0MB 80ms 0ms tinygo 0.25.0
odin 1.odin 290ms 0.2ms 1.2MB 280ms 0ms odin 2023

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 545ms 31ms 40.6MB 520ms 7ms odin 2023
go 1.go 617ms 27ms 73.7MB 597ms 7ms go 1.19.5
go 2.go 621ms 0.8ms 17.6MB 610ms 0ms tinygo 0.25.0
go 1.go 764ms 27ms 41.6MB 747ms 0ms tinygo 0.25.0
go 2.go 901ms 1.5ms 20.0MB 887ms 3ms go 1.19.5
odin 2.odin 1176ms 2.5ms 6.4MB 1163ms 0ms odin 2023

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 116ms 2.6ms 22.1MB 100ms 0ms go 1.19.5
odin 1.odin 119ms 0.9ms 11.3MB 110ms 0ms odin 2023
go 1.go 130ms 1.5ms 13.9MB 117ms 0ms tinygo 0.25.0
go 2.go 146ms 0.6ms 5.6MB 133ms 0ms tinygo 0.25.0
go 2.go 218ms 3.0ms 7.3MB 207ms 0ms go 1.19.5
odin 2.odin 289ms 3.1ms 2.7MB 277ms 0ms odin 2023

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 2484ms 4.4ms 5.4MB 4830ms 0ms go 1.19.5
odin 1.odin 4615ms 1.6ms 2.7MB 4603ms 0ms odin 2023
go 1.go 4964ms 6.5ms 5.4MB 4953ms 0ms go 1.19.5
go 1.go timeout 0.0ms 0.4MB 4983ms 0ms tinygo 0.25.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 628ms 2.7ms 3.4MB 1197ms 0ms go 1.19.5
odin 1.odin 1156ms 0.1ms 2.1MB 1143ms 0ms odin 2023
go 1.go 1245ms 4.2ms 2.9MB 1230ms 0ms go 1.19.5
go 1.go 2577ms 4.4ms 0.0MB 2563ms 0ms tinygo 0.25.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 167ms 2.2ms 2.9MB 297ms 0ms go 1.19.5
odin 1.odin 291ms 0.1ms 1.8MB 280ms 0ms odin 2023
go 1.go 313ms 1.7ms 2.9MB 297ms 0ms go 1.19.5
go 1.go 647ms 1.1ms 0.0MB 633ms 0ms tinygo 0.25.0