Crystal VS Acton benchmarks

Current benchmark data was generated on Wed Mar 22 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 1878ms 2.2ms 64.3MB 1850ms 13ms crystal 1.7.3

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 143ms 1.6ms 11.0MB 130ms 0ms crystal 1.7.3

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 1816ms 1.9ms 20.3MB 1773ms 20ms crystal 1.7.3

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 102ms 4.3ms 7.3MB 87ms 3ms crystal 1.7.3

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 80ms 0.2ms 6.4MB 60ms 0ms crystal 1.7.3
acton 1.act 539ms 20ms 7.4MB 490ms 20ms actonc 0.14.2

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 29ms 0.3ms 5.2MB 20ms 0ms crystal 1.7.3
acton 1.act 235ms 21ms 5.3MB 195ms 0ms actonc 0.14.2

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 3783ms 3.3ms 3.0MB 3770ms 0ms crystal 1.7.3

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 310ms 0.1ms 2.9MB 300ms 0ms crystal 1.7.3

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 2.cr 836ms 0.6ms 3.2MB 720ms 103ms crystal 1.7.3
crystal 1.cr 1076ms 2.2ms 14.6MB 950ms 107ms crystal 1.7.3

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 2.cr 87ms 0.4ms 3.2MB 67ms 10ms crystal 1.7.3
crystal 1.cr 112ms 0.9ms 4.6MB 97ms 0ms crystal 1.7.3

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 3.1ms 0.7ms 2.8MB 0ms 0ms crystal 1.7.3
acton 1.act 8.0ms 3.1ms 3.4MB 0ms 0ms actonc 0.14.2

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 3424ms 79ms 205.6MB 483ms 310ms crystal 1.7.3

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 1147ms 104ms 52.9MB 57ms 53ms crystal 1.7.3

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 0-unsafe.cr 55ms 0.6ms 3.0MB 43ms 0ms crystal 1.7.3
crystal 1.cr 96ms 0.2ms 2.9MB 90ms 0ms crystal 1.7.3

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 0-unsafe.cr 160ms 2.9ms 3.0MB 150ms 0ms crystal 1.7.3
crystal 1.cr 283ms 0.4ms 2.9MB 270ms 0ms crystal 1.7.3

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 0-unsafe.cr 28ms 1.2ms 2.9MB 20ms 0ms crystal 1.7.3
crystal 1.cr 49ms 1.0ms 2.9MB 40ms 0ms crystal 1.7.3

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 490ms 0.7ms 9.7MB 473ms 0ms crystal 1.7.3

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 26ms 1.0ms 6.8MB 10ms 0ms crystal 1.7.3

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 1374ms 4.0ms 64.3MB 1333ms 20ms crystal 1.7.3

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 256ms 4.3ms 22.2MB 237ms 3ms crystal 1.7.3

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 515ms 0.7ms 2.9MB 500ms 0ms crystal 1.7.3
crystal 2.cr 537ms 0.7ms 2.9MB 527ms 0ms crystal 1.7.3

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 55ms 1.6ms 2.9MB 47ms 0ms crystal 1.7.3
crystal 2.cr 57ms 0.7ms 2.9MB 47ms 0ms crystal 1.7.3

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 2.cr 461ms 0.7ms 7.7MB 450ms 0ms crystal 1.7.3
crystal 1.cr 994ms 6.3ms 42.0MB 977ms 3ms crystal 1.7.3

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 2.cr 106ms 0.2ms 4.0MB 100ms 0ms crystal 1.7.3
crystal 1.cr 141ms 0.1ms 12.8MB 130ms 0ms crystal 1.7.3

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 2654ms 116ms 7.5MB 2623ms 17ms crystal 1.7.3
acton 1.act 4313ms 37ms 7.9MB 3970ms 700ms actonc 0.14.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 592ms 21ms 5.9MB 573ms 3ms crystal 1.7.3
acton 1.act 1394ms 250ms 6.8MB 1220ms 253ms actonc 0.14.2

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 2386ms 0.7ms 174.0MB 2333ms 37ms crystal 1.7.3

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 250ms 0.2ms 32.1MB 230ms 7ms crystal 1.7.3

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr timeout 0.0ms 4.1MB 4983ms 0ms crystal 1.7.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 1561ms 4.5ms 3.8MB 1550ms 0ms crystal 1.7.3

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
crystal 1.cr 397ms 1.4ms 3.7MB 380ms 0ms crystal 1.7.3