All Crystal 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

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 2021ms 11ms 64.0MB 1990ms 17ms crystal 1.6.2

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 146ms 1.9ms 11.0MB 133ms 0ms crystal 1.6.2

coro-prime-sieve

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 2008ms 3.3ms 20.2MB 1957ms 33ms crystal 1.6.2

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 116ms 0.5ms 7.3MB 93ms 10ms crystal 1.6.2

edigits

Input: 250001

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 75ms 1.6ms 7.4MB 60ms 0ms crystal 1.6.2

Input: 100000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 29ms 1.1ms 5.2MB 20ms 0ms crystal 1.6.2

fannkuch-redux

Input: 11

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 3746ms 1.4ms 3.0MB 3730ms 0ms crystal 1.6.2

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 301ms 0.2ms 3.0MB 290ms 0ms crystal 1.6.2

fasta

Input: 2500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 722ms 1.3ms 3.2MB 613ms 90ms crystal 1.6.2
1.cr 949ms 1.6ms 14.6MB 830ms 100ms crystal 1.6.2

Input: 250000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 75ms 0.6ms 3.2MB 63ms 3ms crystal 1.6.2
1.cr 99ms 0.4ms 4.5MB 80ms 10ms crystal 1.6.2

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 2.5ms 0.6ms 3.0MB 0ms 0ms crystal 1.6.2

http-server

Input: 3000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 3707ms 389ms 206.8MB 547ms 320ms crystal 1.6.2

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1284ms 9.0ms 51.9MB 63ms 53ms crystal 1.6.2

lru

Input: 1000 1000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.cr 56ms 0.4ms 2.9MB 47ms 0ms crystal 1.6.2
1.cr 93ms 1.0ms 3.0MB 83ms 0ms crystal 1.6.2

Input: 1000 3000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.cr 161ms 2.4ms 2.9MB 150ms 0ms crystal 1.6.2
1.cr 272ms 0.6ms 3.0MB 263ms 0ms crystal 1.6.2

Input: 100 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.cr 27ms 0.3ms 3.0MB 17ms 0ms crystal 1.6.2
1.cr 47ms 1.0ms 3.0MB 40ms 0ms crystal 1.6.2

mandelbrot

Input: 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 375ms 0.3ms 9.5MB 360ms 0ms crystal 1.6.2

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 21ms 0.1ms 7.2MB 10ms 0ms crystal 1.6.2

merkletrees

Input: 17

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1492ms 19ms 64.2MB 1450ms 20ms crystal 1.6.2

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 242ms 2.5ms 22.2MB 227ms 0ms crystal 1.6.2

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 564ms 1.5ms 2.9MB 550ms 0ms crystal 1.6.2
2.cr 577ms 0.1ms 3.0MB 567ms 0ms crystal 1.6.2

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 59ms 0.0ms 2.9MB 50ms 0ms crystal 1.6.2
2.cr 60ms 0.3ms 2.9MB 50ms 0ms crystal 1.6.2

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 432ms 1.5ms 7.9MB 417ms 0ms crystal 1.6.2
1.cr 898ms 16ms 42.2MB 877ms 0ms crystal 1.6.2

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 96ms 0.4ms 4.1MB 87ms 0ms crystal 1.6.2
1.cr 148ms 1.0ms 12.8MB 137ms 0ms crystal 1.6.2

pidigits

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 2668ms 17ms 7.3MB 2637ms 10ms crystal 1.6.2

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 584ms 35ms 5.6MB 567ms 0ms crystal 1.6.2

regex-redux

Input: 2500000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 2308ms 1.8ms 173.8MB 2247ms 43ms crystal 1.6.2

Input: 250000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 240ms 1.2ms 32.1MB 217ms 10ms crystal 1.6.2

spectral-norm

Input: 8000

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

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1562ms 0.8ms 4.1MB 1550ms 0ms crystal 1.6.2

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 395ms 0.4ms 3.6MB 383ms 0ms crystal 1.6.2