Kotlin VS Acton benchmarks

Current benchmark data was generated on Fri Dec 09 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL 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

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 666ms 9.4ms 413.0MB 663ms 107ms kotlin/jvm 17.0.2
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 140ms 6.9ms 154.2MB 107ms 40ms kotlin/jvm 17.0.2
kotlin 1-m.kt 460ms 8.9ms 30.4MB 757ms 0ms kotlin/native 1.7.22

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 2-m.kt 2780ms 101ms 156.9MB 5240ms 100ms kotlin/jvm 17.0.2
kotlin 1.kt 3095ms 73ms 161.4MB 3870ms 103ms kotlin/jvm 17.0.2
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22
kotlin 2-m.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1-m.kt 721ms 15ms 100.0MB 1263ms 43ms kotlin/jvm 17.0.2
kotlin 2-m.kt 816ms 14ms 33.0MB 1470ms 30ms kotlin/native 1.7.22
kotlin 2-m.kt 937ms 51ms 101.5MB 1633ms 70ms kotlin/jvm 17.0.2
kotlin 1.kt 1101ms 2.7ms 8.9MB 1250ms 10ms kotlin/native 1.7.22

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 2.2ms 0.6ms 1.5MB 0ms 0ms kotlin/native 1.7.22
acton 1.act 5.2ms 3.9ms 3.1MB 0ms 0ms actonc 0.14.2
kotlin 1.kt 69ms 3.3ms 40.9MB 56ms 6ms kotlin/jvm 17.0.2

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/jvm 17.0.2
kotlin 2.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/jvm 17.0.2

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1-m.kt 2727ms 85ms 182.6MB 4087ms 350ms kotlin/jvm 17.0.2
kotlin 2.kt 3010ms 422ms 193.8MB 2863ms 223ms kotlin/jvm 17.0.2

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1-m.kt 1149ms 4.5ms 209.5MB 1907ms 113ms kotlin/jvm 17.0.2

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 4379ms 265ms 908.2MB 6233ms 297ms kotlin/jvm 17.0.2

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 2-m.kt 249ms 0.9ms 113.5MB 330ms 43ms kotlin/jvm 17.0.2
kotlin 1.kt 253ms 7.9ms 109.7MB 303ms 30ms kotlin/jvm 17.0.2
kotlin 2-m.kt 439ms 1.1ms 42.3MB 663ms 7ms kotlin/native 1.7.22
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 2.kt 419ms 3.3ms 124.6MB 510ms 30ms kotlin/jvm 17.0.2
kotlin 1.kt 477ms 3.5ms 138.3MB 523ms 33ms kotlin/jvm 17.0.2
kotlin 2.kt 1391ms 18ms 113.7MB 2003ms 47ms kotlin/native 1.7.22
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 189ms 7.8ms 75.9MB 250ms 17ms kotlin/jvm 17.0.2
kotlin 2-m.kt 194ms 6.2ms 78.6MB 270ms 23ms kotlin/jvm 17.0.2
kotlin 2-m.kt 223ms 2.7ms 28.4MB 343ms 7ms kotlin/native 1.7.22
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 508ms 33ms 559.9MB 463ms 100ms kotlin/jvm 17.0.2
kotlin 1.kt 2727ms 10.0ms 146.6MB 3927ms 63ms kotlin/native 1.7.22

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 199ms 2.1ms 221.2MB 163ms 60ms kotlin/jvm 17.0.2
kotlin 1.kt 509ms 5.9ms 38.4MB 733ms 10ms kotlin/native 1.7.22

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 635ms 15ms 43.1MB 633ms 20ms kotlin/jvm 17.0.2
kotlin 1n.kt 677ms 0.5ms 1.5MB 667ms 0ms kotlin/native 1.7.22

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1n.kt 71ms 1.2ms 1.5MB 60ms 0ms kotlin/native 1.7.22
kotlin 1.kt 147ms 3.4ms 42.9MB 153ms 13ms kotlin/jvm 17.0.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
acton 1.act 4902ms 85ms 7.8MB 4477ms 777ms actonc 0.14.2
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/jvm 17.0.2
kotlin 1n.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22
kotlin 2n.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 1459ms 8.0ms 210.0MB 1770ms 73ms kotlin/jvm 17.0.2
acton 1.act 1475ms 7.3ms 6.4MB 1327ms 277ms actonc 0.14.2
kotlin 1n.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22
kotlin 2n.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/jvm 17.0.2
kotlin 1n.kt timeout 0.0ms 0.0MB 0ms 0ms kotlin/native 1.7.22

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 997ms 10ms 95.3MB 1343ms 27ms kotlin/jvm 17.0.2
kotlin 1n.kt 4603ms 24ms 65.2MB 5970ms 27ms kotlin/native 1.7.22

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1.kt 4497ms 8.9ms 180.9MB 5347ms 80ms kotlin/jvm 17.0.2

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
kotlin 1-m.kt 1364ms 17ms 186.9MB 2050ms 77ms kotlin/jvm 17.0.2