All Rust 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.)

fasta

Input: 2500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
5-m.rs 227ms 3.7ms 1.3MB 407ms 0ms rustc 1.62.0
5c-m.rs 230ms 12ms 1.3MB 400ms 3ms rustc 1.64.0-nightly
1c.rs 264ms 2.8ms 0.7MB 257ms 0ms rustc 1.64.0-nightly
1.rs 319ms 2.0ms 0.6MB 307ms 0ms rustc 1.62.0

Input: 250000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1c.rs 33ms 2.9ms 0.7MB 17ms 0ms rustc 1.64.0-nightly
5c-m.rs 34ms 0.6ms 1.3MB 43ms 0ms rustc 1.64.0-nightly
5-m.rs 35ms 2.5ms 1.3MB 40ms 0ms rustc 1.62.0
1.rs 35ms 0.6ms 0.6MB 23ms 0ms rustc 1.62.0

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 2.0ms 0.9ms 0.6MB 0ms 0ms rustc 1.64.0-nightly
1.rs 2.2ms 0.5ms 1.8MB 0ms 0ms rustc 1.62.0

mandelbrot

Input: 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
9.rs 454ms 14ms 4.9MB 440ms 0ms rustc 1.64.0-nightly
8.rs 619ms 0.9ms 4.8MB 607ms 3ms rustc 1.62.0

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
9.rs 21ms 0.4ms 0.6MB 10ms 0ms rustc 1.64.0-nightly
8.rs 29ms 0.5ms 0.6MB 17ms 0ms rustc 1.62.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4-i.rs 255ms 1.5ms 0.6MB 243ms 0ms rustc 1.62.0
7-i.rs 352ms 4.8ms 1.9MB 337ms 0ms rustc 1.62.0
3.rs 375ms 5.5ms 0.6MB 363ms 0ms rustc 1.64.0-nightly
2.rs 447ms 21ms 0.6MB 433ms 0ms rustc 1.62.0
1.rs 497ms 3.4ms 2.0MB 483ms 0ms rustc 1.62.0

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4-i.rs 29ms 1.4ms 0.6MB 20ms 0ms rustc 1.62.0
7-i.rs 38ms 1.7ms 0.6MB 23ms 0ms rustc 1.62.0
3.rs 41ms 1.1ms 0.6MB 23ms 0ms rustc 1.64.0-nightly
2.rs 50ms 2.8ms 0.6MB 40ms 0ms rustc 1.62.0
1.rs 55ms 3.7ms 0.6MB 43ms 0ms rustc 1.62.0

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8-m.rs 1117ms 15ms 2.5MB 2127ms 0ms rustc 1.64.0-nightly
7-m.rs 1119ms 18ms 2.2MB 2133ms 0ms rustc 1.62.0
8.rs 2119ms 2.9ms 2.5MB 2103ms 0ms rustc 1.64.0-nightly
7.rs 2122ms 10ms 2.2MB 2107ms 0ms rustc 1.62.0
2-m.rs 2246ms 7.1ms 2.1MB 4343ms 3ms rustc 1.62.0
2.rs timeout 0.0ms 0.0MB 0ms 0ms rustc 1.62.0

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8-m.rs 288ms 5.4ms 2.3MB 523ms 0ms rustc 1.64.0-nightly
7-m.rs 292ms 4.8ms 0.7MB 533ms 0ms rustc 1.62.0
8.rs 533ms 5.1ms 2.2MB 520ms 0ms rustc 1.64.0-nightly
7.rs 534ms 5.0ms 0.6MB 523ms 0ms rustc 1.62.0
2-m.rs 571ms 1.0ms 2.2MB 1077ms 0ms rustc 1.62.0
2.rs 1921ms 16ms 0.6MB 1907ms 0ms rustc 1.62.0

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8-m.rs 79ms 1.8ms 2.3MB 130ms 0ms rustc 1.64.0-nightly
7-m.rs 80ms 2.2ms 0.7MB 127ms 0ms rustc 1.62.0
7.rs 135ms 3.2ms 0.6MB 127ms 0ms rustc 1.62.0
8.rs 139ms 9.4ms 2.2MB 127ms 0ms rustc 1.64.0-nightly
2-m.rs 153ms 2.4ms 0.7MB 270ms 0ms rustc 1.62.0
2.rs 490ms 12ms 0.6MB 480ms 0ms rustc 1.62.0

binarytrees

Input: 18

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4.rs 2145ms 51ms 33.8MB 2117ms 7ms rustc 1.62.0
3.rs 2420ms 51ms 49.9MB 2383ms 20ms rustc 1.62.0
5.rs 2448ms 48ms 33.8MB 2410ms 17ms rustc 1.62.0

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
4.rs 190ms 4.6ms 5.7MB 177ms 0ms rustc 1.62.0
3.rs 197ms 2.1ms 7.8MB 187ms 0ms rustc 1.62.0
5.rs 214ms 7.6ms 6.1MB 200ms 0ms rustc 1.62.0

coro-prime-sieve

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
5-m.rs 1156ms 57ms 5.2MB 2180ms 47ms rustc 1.62.0
3-m.rs 1262ms 125ms 6.2MB 2403ms 47ms rustc 1.62.0
3.rs 2259ms 28ms 6.5MB 2203ms 37ms rustc 1.62.0
4.rs 3808ms 8.6ms 4.4MB 3793ms 3ms rustc 1.62.0
1-m.rs 4027ms 100ms 5.4MB 7733ms 123ms rustc 1.62.0

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3-m.rs 92ms 4.5ms 3.0MB 150ms 3ms rustc 1.62.0
5-m.rs 114ms 30ms 3.0MB 193ms 7ms rustc 1.62.0
3.rs 139ms 4.8ms 3.1MB 130ms 0ms rustc 1.62.0
4.rs 249ms 3.1ms 2.6MB 233ms 0ms rustc 1.62.0
1-m.rs 272ms 5.3ms 3.0MB 497ms 7ms rustc 1.62.0

edigits

Input: 250001

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 170ms 2.1ms 3.7MB 160ms 0ms rustc 1.62.0
2.rs 701ms 1.9ms 3.8MB 690ms 0ms rustc 1.62.0

Input: 100000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 50ms 1.9ms 3.0MB 40ms 0ms rustc 1.62.0
2.rs 137ms 1.3ms 3.3MB 123ms 0ms rustc 1.62.0

fannkuch-redux

Input: 11

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3-im.rs 806ms 6.0ms 0.7MB 1540ms 0ms rustc 1.62.0
2-im.rs 1181ms 28ms 0.6MB 2240ms 0ms rustc 1.62.0
5-m.rs 1439ms 11ms 0.7MB 2717ms 0ms rustc 1.62.0
3-i.rs 1454ms 5.7ms 0.6MB 1440ms 0ms rustc 1.62.0
2-i.rs 2223ms 13ms 0.6MB 2207ms 0ms rustc 1.62.0
1-m.rs 2529ms 23ms 0.7MB 4860ms 7ms rustc 1.62.0
1.rs 4910ms 58ms 0.6MB 4893ms 0ms rustc 1.62.0

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3-im.rs 75ms 1.4ms 0.7MB 120ms 0ms rustc 1.62.0
2-im.rs 111ms 2.7ms 0.7MB 180ms 0ms rustc 1.62.0
3-i.rs 129ms 5.3ms 0.6MB 113ms 0ms rustc 1.62.0
5-m.rs 132ms 5.4ms 0.7MB 223ms 0ms rustc 1.62.0
2-i.rs 189ms 0.8ms 0.6MB 180ms 0ms rustc 1.62.0
1-m.rs 227ms 2.1ms 0.7MB 397ms 0ms rustc 1.62.0
1.rs 413ms 5.1ms 0.6MB 403ms 0ms rustc 1.62.0

http-server

Input: 3000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 161ms 2.6ms 16.4MB 100ms 110ms rustc 1.62.0
2-http2.rs 359ms 74ms 54.5MB 450ms 137ms rustc 1.62.0
2-m.rs 637ms 4.5ms 113.9MB 393ms 617ms rustc 1.62.0
1-http2.rs 1243ms 159ms 88.3MB 1597ms 623ms rustc 1.62.0

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 63ms 3.9ms 11.7MB 20ms 37ms rustc 1.62.0
2.rs 153ms 2.9ms 28.4MB 50ms 110ms rustc 1.62.0
2-http2.rs 366ms 78ms 27.3MB 497ms 133ms rustc 1.62.0
1-http2.rs 464ms 29ms 29.4MB 657ms 153ms rustc 1.62.0

json-serde

Input: sample 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.rs 101ms 1.7ms 38.2MB 67ms 17ms rustc 1.62.0
3.rs 102ms 2.0ms 36.4MB 77ms 13ms rustc 1.62.0
1.rs 167ms 4.7ms 75.4MB 110ms 43ms rustc 1.62.0

Input: canada 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.rs 612ms 4.1ms 258.2MB 453ms 140ms rustc 1.62.0
2.rs 630ms 8.4ms 258.3MB 480ms 133ms rustc 1.62.0
1.rs 1063ms 3.1ms 605.8MB 747ms 297ms rustc 1.62.0

knucleotide

Input: 2500000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8-m.rs 455ms 28ms 28.5MB 793ms 20ms rustc 1.62.0
8.rs 790ms 4.0ms 23.5MB 757ms 13ms rustc 1.62.0

Input: 250000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8-m.rs 63ms 2.8ms 15.8MB 83ms 3ms rustc 1.62.0
8.rs 100ms 6.0ms 11.6MB 83ms 3ms rustc 1.62.0

lru

Input: 1000 1000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.rs 73ms 4.3ms 0.6MB 63ms 0ms rustc 1.62.0
1.rs 94ms 4.0ms 2.1MB 83ms 0ms rustc 1.62.0

Input: 1000 3000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.rs 250ms 26ms 0.6MB 240ms 0ms rustc 1.62.0
1.rs 351ms 6.1ms 2.1MB 343ms 0ms rustc 1.62.0

Input: 100 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-unsafe.rs 39ms 2.2ms 0.6MB 27ms 0ms rustc 1.62.0
1.rs 58ms 2.0ms 0.6MB 47ms 0ms rustc 1.62.0

merkletrees

Input: 17

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 1087ms 3.1ms 33.9MB 1057ms 17ms rustc 1.62.0

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 223ms 0.9ms 9.9MB 210ms 0ms rustc 1.62.0

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.rs 575ms 8.8ms 6.7MB 563ms 0ms rustc 1.62.0
1.rs 1125ms 29ms 40.9MB 1097ms 13ms rustc 1.62.0

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.rs 131ms 5.4ms 3.2MB 120ms 0ms rustc 1.62.0
1.rs 148ms 2.4ms 11.5MB 133ms 0ms rustc 1.62.0

pidigits

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 2159ms 18ms 2.7MB 1980ms 163ms rustc 1.62.0
2.rs 2221ms 11ms 2.8MB 2120ms 80ms rustc 1.62.0

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.rs 461ms 5.4ms 2.6MB 437ms 7ms rustc 1.62.0
2.rs 499ms 4.5ms 2.5MB 487ms 0ms rustc 1.62.0

regex-redux

Input: 2500000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
7.rs 714ms 7.0ms 78.0MB 923ms 27ms rustc 1.62.0

Input: 250000_in

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
7.rs 80ms 1.8ms 12.1MB 87ms 0ms rustc 1.62.0

secp256k1

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0.rs 167ms 4.0ms 1.9MB 160ms 0ms rustc 1.62.0
1.rs 2310ms 8.9ms 0.6MB 2300ms 0ms rustc 1.62.0

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0.rs 44ms 0.4ms 0.7MB 30ms 0ms rustc 1.62.0
1.rs 575ms 7.7ms 0.7MB 563ms 0ms rustc 1.62.0