All Crystal benchmarks

Current benchmark data was generated on Fri Jul 01 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8171M 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 2229ms 19ms 64.5MB 2610ms 27ms crystal 1.4.1

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 174ms 1.3ms 13.0MB 180ms 7ms crystal 1.4.1

coro-prime-sieve

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 2705ms 26ms 22.1MB 2643ms 47ms crystal 1.4.1

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 154ms 7.7ms 9.7MB 137ms 3ms crystal 1.4.1

edigits

Input: 250001

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 97ms 3.1ms 7.4MB 73ms 13ms crystal 1.4.1

Input: 100000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 38ms 2.0ms 5.3MB 27ms 0ms crystal 1.4.1

fannkuch-redux

Input: 11

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

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 412ms 4.7ms 3.0MB 397ms 0ms crystal 1.4.1

fasta

Input: 2500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 957ms 9.8ms 3.6MB 850ms 97ms crystal 1.4.1
1.cr 1225ms 7.0ms 16.5MB 1080ms 123ms crystal 1.4.1

Input: 250000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 103ms 2.8ms 3.6MB 70ms 13ms crystal 1.4.1
1.cr 128ms 0.7ms 4.6MB 103ms 7ms crystal 1.4.1

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 4.6ms 1.0ms 2.9MB 0ms 0ms crystal 1.4.1

http-server

Input: 3000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 3640ms 109ms 120.2MB 387ms 373ms crystal 1.4.1

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1123ms 9.7ms 32.7MB 47ms 73ms crystal 1.4.1

lru

Input: 1000 1000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.cr 75ms 1.0ms 3.0MB 67ms 0ms crystal 1.4.1
1.cr 138ms 0.4ms 5.0MB 130ms 0ms crystal 1.4.1

Input: 1000 3000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.cr 217ms 4.4ms 3.0MB 203ms 0ms crystal 1.4.1
1.cr 397ms 8.6ms 3.1MB 383ms 0ms crystal 1.4.1

Input: 100 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.cr 38ms 1.4ms 3.0MB 27ms 0ms crystal 1.4.1
1.cr 69ms 0.1ms 5.1MB 60ms 0ms crystal 1.4.1

mandelbrot

Input: 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1080ms 5.3ms 7.5MB 1067ms 0ms crystal 1.4.1

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 52ms 1.8ms 4.9MB 40ms 0ms crystal 1.4.1

merkletrees

Input: 17

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1673ms 13ms 64.5MB 1920ms 37ms crystal 1.4.1

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 310ms 7.2ms 19.3MB 340ms 10ms crystal 1.4.1

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 726ms 6.4ms 4.9MB 710ms 0ms crystal 1.4.1
2.cr 764ms 18ms 3.1MB 753ms 0ms crystal 1.4.1

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 76ms 0.3ms 5.0MB 67ms 0ms crystal 1.4.1
2.cr 83ms 1.9ms 5.1MB 70ms 0ms crystal 1.4.1

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 535ms 0.6ms 8.2MB 517ms 0ms crystal 1.4.1
1.cr 1373ms 15ms 42.4MB 1347ms 10ms crystal 1.4.1

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.cr 121ms 1.2ms 4.4MB 110ms 0ms crystal 1.4.1
1.cr 173ms 4.8ms 12.9MB 160ms 0ms crystal 1.4.1

pidigits

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 3408ms 85ms 8.8MB 3730ms 357ms crystal 1.4.1

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 809ms 14ms 5.3MB 857ms 87ms crystal 1.4.1

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.4.1

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 1849ms 18ms 4.0MB 1837ms 0ms crystal 1.4.1

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cr 467ms 4.6ms 5.5MB 453ms 0ms crystal 1.4.1