Rust VS Python benchmarks

Current benchmark data was generated on Wed Sep 28 2022, 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.)

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5c-m.rs 179ms 0.5ms 1.3MB 320ms 0ms rustc 1.66.0-nightly
rust 5-m.rs 201ms 2.8ms 1.3MB 363ms 0ms rustc 1.64.0
rust 1c.rs 230ms 0.9ms 0.7MB 220ms 0ms rustc 1.66.0-nightly
rust 1.rs 316ms 3.1ms 0.6MB 307ms 0ms rustc 1.64.0
python 1.py 2430ms 2.9ms 91.0MB 2397ms 17ms pypy 3.8.13
python 5-m.py 3362ms 35ms 12.7MB 4993ms 967ms pyston 3.8.12
python 5-m.py 3866ms 39ms 85.1MB 5200ms 1070ms pypy 3.8.13
python 1.py 4087ms 9.2ms 7.9MB 4070ms 3ms pyston 3.8.12
python 5-m.py 4441ms 70ms 12.0MB 6400ms 987ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1c.rs 26ms 0.6ms 1.9MB 17ms 0ms rustc 1.66.0-nightly
rust 5c-m.rs 27ms 2.6ms 1.2MB 37ms 0ms rustc 1.66.0-nightly
rust 5-m.rs 30ms 2.3ms 1.3MB 33ms 0ms rustc 1.64.0
rust 1.rs 34ms 0.2ms 0.6MB 23ms 0ms rustc 1.64.0
python 1.py 326ms 3.7ms 81.6MB 290ms 17ms pypy 3.8.13
python 1.py 423ms 0.9ms 7.9MB 413ms 0ms pyston 3.8.12
python 5-m.py 481ms 4.4ms 12.6MB 707ms 110ms pyston 3.8.12
python 5-m.py 508ms 1.0ms 12.1MB 660ms 140ms cpython 3.10.7
python 1.py 708ms 2.1ms 7.8MB 697ms 0ms cpython 3.10.7
python 5-m.py 793ms 2.8ms 85.2MB 893ms 423ms pypy 3.8.13

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 1.5ms 0.3ms 2.0MB 0ms 0ms rustc 1.64.0
rust 1.rs 2.8ms 1.5ms 2.0MB 0ms 0ms rustc 1.66.0-nightly
python 1.py 14ms 1.1ms 7.3MB 10ms 0ms pyston 3.8.12
python 1.py 15ms 1.1ms 7.4MB 10ms 0ms cpython 3.10.7
python 1.py 34ms 2.3ms 54.9MB 12ms 8ms pypy 3.8.13

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 9.rs 413ms 0.7ms 4.8MB 403ms 0ms rustc 1.66.0-nightly
rust 8.rs 580ms 0.8ms 4.9MB 570ms 0ms rustc 1.64.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 9.rs 20ms 0.3ms 0.6MB 10ms 0ms rustc 1.66.0-nightly
rust 8.rs 27ms 0.3ms 0.6MB 20ms 0ms rustc 1.64.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 4-i.rs 252ms 0.3ms 0.6MB 240ms 0ms rustc 1.64.0
rust 7-i.rs 305ms 1.6ms 0.6MB 290ms 0ms rustc 1.64.0
rust 3.rs 338ms 0.5ms 0.7MB 330ms 0ms rustc 1.66.0-nightly
rust 2.rs 343ms 4.2ms 0.6MB 333ms 0ms rustc 1.64.0
rust 1.rs 383ms 0.6ms 0.6MB 370ms 0ms rustc 1.64.0
python 2.py 1903ms 43ms 80.2MB 1873ms 10ms pypy 3.8.13
python 1.py 4875ms 37ms 79.5MB 4843ms 13ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 2.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 4-i.rs 27ms 0.4ms 0.6MB 20ms 0ms rustc 1.64.0
rust 7-i.rs 33ms 0.3ms 0.6MB 27ms 0ms rustc 1.64.0
rust 3.rs 36ms 0.6ms 0.6MB 27ms 0ms rustc 1.66.0-nightly
rust 2.rs 36ms 0.4ms 0.6MB 30ms 0ms rustc 1.64.0
rust 1.rs 42ms 1.0ms 0.6MB 30ms 0ms rustc 1.64.0
python 2.py 250ms 4.9ms 79.9MB 217ms 17ms pypy 3.8.13
python 1.py 534ms 3.2ms 79.3MB 510ms 13ms pypy 3.8.13
python 1.py 1197ms 9.9ms 8.3MB 1183ms 0ms pyston 3.8.12
python 2.py 1623ms 53ms 8.2MB 1610ms 0ms pyston 3.8.12
python 1.py 4672ms 67ms 7.4MB 4657ms 0ms cpython 3.10.7
python 2.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7-m.rs 1057ms 1.7ms 2.1MB 2053ms 0ms rustc 1.64.0
rust 8-m.rs 1058ms 1.0ms 2.5MB 2050ms 0ms rustc 1.66.0-nightly
rust 8.rs 2060ms 0.5ms 2.5MB 2050ms 0ms rustc 1.66.0-nightly
rust 7.rs 2061ms 1.5ms 2.2MB 2050ms 0ms rustc 1.64.0
rust 2-m.rs 2124ms 0.5ms 2.1MB 4147ms 0ms rustc 1.64.0
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12
rust 2.rs timeout 0.0ms 0.0MB 0ms 0ms rustc 1.64.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7-m.rs 272ms 0.9ms 0.7MB 507ms 0ms rustc 1.64.0
rust 8-m.rs 274ms 0.6ms 2.2MB 510ms 0ms rustc 1.66.0-nightly
rust 7.rs 517ms 0.3ms 0.6MB 510ms 0ms rustc 1.64.0
rust 8.rs 517ms 0.5ms 2.1MB 507ms 0ms rustc 1.66.0-nightly
rust 2-m.rs 549ms 13ms 2.3MB 1033ms 3ms rustc 1.64.0
rust 2.rs 1707ms 1.9ms 0.6MB 1697ms 0ms rustc 1.64.0
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7-m.rs 74ms 1.4ms 0.7MB 123ms 0ms rustc 1.64.0
rust 8-m.rs 75ms 1.4ms 2.2MB 127ms 0ms rustc 1.66.0-nightly
rust 8.rs 131ms 0.2ms 2.2MB 120ms 0ms rustc 1.66.0-nightly
rust 7.rs 132ms 0.8ms 1.9MB 120ms 0ms rustc 1.64.0
rust 2-m.rs 143ms 0.2ms 0.7MB 257ms 0ms rustc 1.64.0
rust 2.rs 429ms 0.1ms 0.6MB 420ms 0ms rustc 1.64.0
python 8-m.py 3207ms 84ms 110.9MB 5483ms 330ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1423ms 18ms 273.9MB 1297ms 103ms pypy 3.8.13
rust 4.rs 1521ms 12ms 33.8MB 1497ms 10ms rustc 1.64.0
rust 5.rs 1671ms 6.5ms 33.8MB 1650ms 7ms rustc 1.64.0
rust 3.rs 1781ms 12ms 49.9MB 1753ms 13ms rustc 1.64.0
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 114ms 2.9ms 83.3MB 83ms 13ms pypy 3.8.13
rust 4.rs 139ms 0.3ms 6.0MB 127ms 0ms rustc 1.64.0
rust 5.rs 154ms 1.0ms 6.1MB 140ms 0ms rustc 1.64.0
rust 3.rs 166ms 6.2ms 7.9MB 150ms 0ms rustc 1.64.0
python 1.py 604ms 2.9ms 11.9MB 583ms 3ms pyston 3.8.12
python 1.py 1521ms 20ms 11.9MB 1507ms 3ms cpython 3.10.7

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3-m.rs 919ms 31ms 6.3MB 1747ms 27ms rustc 1.64.0
python 1.py 1008ms 16ms 196.8MB 940ms 57ms pypy 3.8.13
rust 5-m.rs 1054ms 190ms 5.3MB 2020ms 27ms rustc 1.64.0
rust 3.rs 1826ms 17ms 6.5MB 1783ms 27ms rustc 1.64.0
rust 1-m.rs 2599ms 17ms 4.9MB 5000ms 103ms rustc 1.64.0
rust 4.rs 3190ms 2.2ms 4.5MB 3173ms 0ms rustc 1.64.0
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3-m.rs 73ms 3.6ms 3.0MB 120ms 0ms rustc 1.64.0
rust 3.rs 120ms 3.2ms 3.1MB 107ms 0ms rustc 1.64.0
rust 5-m.rs 121ms 7.7ms 3.0MB 217ms 3ms rustc 1.64.0
rust 1-m.rs 189ms 6.3ms 2.8MB 333ms 10ms rustc 1.64.0
rust 4.rs 210ms 0.1ms 2.5MB 200ms 0ms rustc 1.64.0
python 1.py 260ms 0.8ms 95.4MB 223ms 20ms pypy 3.8.13
python 1.py 930ms 3.1ms 17.0MB 917ms 0ms pyston 3.8.12
python 1.py 977ms 2.6ms 17.0MB 963ms 0ms cpython 3.10.7

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 146ms 0.2ms 3.6MB 140ms 0ms rustc 1.64.0
rust 2.rs 598ms 0.1ms 3.8MB 583ms 0ms rustc 1.64.0
python 1.py 810ms 2.1ms 88.0MB 777ms 17ms pypy 3.8.13
python 1.py 1669ms 0.8ms 9.3MB 1657ms 0ms cpython 3.10.7
python 1.py 2779ms 0.9ms 9.6MB 2760ms 0ms pyston 3.8.12

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 41ms 0.6ms 3.0MB 30ms 0ms rustc 1.64.0
rust 2.rs 113ms 1.1ms 3.2MB 100ms 0ms rustc 1.64.0
python 1.py 206ms 0.7ms 81.8MB 177ms 13ms pypy 3.8.13
python 1.py 308ms 0.6ms 8.5MB 293ms 0ms cpython 3.10.7
python 1.py 479ms 1.0ms 8.9MB 467ms 0ms pyston 3.8.12

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3-im.rs 719ms 6.5ms 0.7MB 1387ms 0ms rustc 1.64.0
rust 2-im.rs 1078ms 2.5ms 0.7MB 2070ms 0ms rustc 1.64.0
rust 5-m.rs 1233ms 12ms 0.7MB 2380ms 0ms rustc 1.64.0
rust 3-i.rs 1432ms 1.8ms 0.6MB 1420ms 0ms rustc 1.64.0
rust 1-m.rs 1946ms 14ms 0.7MB 3787ms 0ms rustc 1.64.0
rust 2-i.rs 1996ms 0.5ms 0.6MB 1980ms 0ms rustc 1.64.0
rust 1.rs 3862ms 80ms 0.6MB 3850ms 0ms rustc 1.64.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3-im.rs 66ms 1.6ms 0.7MB 110ms 0ms rustc 1.64.0
rust 2-im.rs 96ms 0.1ms 0.7MB 160ms 0ms rustc 1.64.0
rust 5-m.rs 112ms 2.9ms 0.7MB 190ms 0ms rustc 1.64.0
rust 3-i.rs 120ms 0.7ms 0.6MB 110ms 0ms rustc 1.64.0
rust 2-i.rs 166ms 0.6ms 0.6MB 160ms 0ms rustc 1.64.0
rust 1-m.rs 173ms 2.7ms 0.7MB 310ms 0ms rustc 1.64.0
rust 1.rs 323ms 1.7ms 0.6MB 310ms 0ms rustc 1.64.0

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 148ms 8.7ms 19.7MB 93ms 70ms rustc 1.64.0
rust 2-http2.rs 327ms 15ms 47.0MB 440ms 103ms rustc 1.64.0
rust 2-m.rs 493ms 5.9ms 112.4MB 283ms 477ms rustc 1.64.0
rust 1-http2.rs 726ms 40ms 82.1MB 870ms 360ms rustc 1.64.0
python 1.py 1540ms 5.2ms 29.2MB 1313ms 873ms pyston 3.8.12
python 1.py 2194ms 16ms 31.2MB 1910ms 1010ms cpython 3.10.7
python 1.py 4259ms 35ms 130.2MB 3287ms 887ms pypy 3.8.13

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 73ms 17ms 14.5MB 13ms 27ms rustc 1.64.0
rust 2.rs 126ms 3.2ms 29.1MB 33ms 90ms rustc 1.64.0
rust 2-http2.rs 227ms 27ms 27.0MB 290ms 63ms rustc 1.64.0
python 1.py 349ms 2.0ms 23.3MB 277ms 167ms pyston 3.8.12
rust 1-http2.rs 405ms 16ms 28.3MB 643ms 73ms rustc 1.64.0
python 1.py 436ms 1.4ms 23.8MB 363ms 187ms cpython 3.10.7
python 1.py 1073ms 11ms 105.9MB 880ms 163ms pypy 3.8.13

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3.rs 75ms 0.6ms 36.4MB 53ms 7ms rustc 1.64.0
rust 2.rs 77ms 1.9ms 38.1MB 53ms 7ms rustc 1.64.0
rust 1.rs 120ms 1.0ms 75.5MB 70ms 30ms rustc 1.64.0
python 1.py 246ms 1.7ms 38.2MB 220ms 10ms pyston 3.8.12
python 1.py 263ms 3.1ms 38.7MB 237ms 10ms cpython 3.10.7
python 1.py 423ms 1.8ms 109.1MB 387ms 20ms pypy 3.8.13

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3.rs 501ms 0.7ms 257.9MB 393ms 97ms rustc 1.64.0
rust 2.rs 508ms 0.7ms 258.5MB 400ms 93ms rustc 1.64.0
rust 1.rs 861ms 2.2ms 606.0MB 603ms 240ms rustc 1.64.0
python 1.py 2313ms 2.4ms 220.6MB 2177ms 123ms pyston 3.8.12
python 1.py 2326ms 1.8ms 219.6MB 2197ms 113ms cpython 3.10.7
python 1.py 2580ms 12ms 248.8MB 2497ms 67ms pypy 3.8.13

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 338ms 2.7ms 28.6MB 593ms 10ms rustc 1.64.0
rust 8.rs 629ms 19ms 24.1MB 607ms 7ms rustc 1.64.0
python 3-m.py 3411ms 2.7ms 203.0MB 5960ms 320ms pypy 3.8.13
python 3-m.py 4696ms 72ms 34.2MB 8987ms 57ms pyston 3.8.12
python 3.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 46ms 0.5ms 15.6MB 60ms 3ms rustc 1.64.0
rust 8.rs 76ms 1.4ms 11.5MB 60ms 7ms rustc 1.64.0
python 3-m.py 516ms 7.9ms 97.3MB 743ms 110ms pypy 3.8.13
python 3-m.py 550ms 5.5ms 15.7MB 953ms 47ms pyston 3.8.12
python 3-m.py 832ms 4.8ms 13.6MB 1517ms 13ms cpython 3.10.7

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 65ms 3.7ms 0.6MB 53ms 0ms rustc 1.64.0
rust 1.rs 72ms 1.4ms 2.2MB 60ms 0ms rustc 1.64.0
python 2.py 196ms 0.7ms 79.9MB 170ms 10ms pypy 3.8.13
python 1.py 237ms 1.7ms 81.0MB 210ms 13ms pypy 3.8.13
python 1.py 985ms 4.4ms 9.0MB 963ms 3ms pyston 3.8.12
python 2.py 1156ms 8.0ms 8.7MB 1147ms 0ms pyston 3.8.12
python 1.py 1833ms 6.7ms 8.4MB 1823ms 0ms cpython 3.10.7
python 2.py 2618ms 42ms 8.3MB 2603ms 0ms cpython 3.10.7

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 213ms 14ms 2.2MB 203ms 0ms rustc 1.64.0
rust 1.rs 304ms 12ms 2.2MB 290ms 0ms rustc 1.64.0
python 2.py 461ms 1.8ms 80.0MB 433ms 13ms pypy 3.8.13
python 1.py 503ms 2.3ms 81.3MB 467ms 20ms pypy 3.8.13
python 1.py 2936ms 17ms 8.9MB 2927ms 0ms pyston 3.8.12
python 2.py 3435ms 11ms 8.7MB 3420ms 0ms pyston 3.8.12
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 2.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 35ms 0.2ms 0.6MB 27ms 0ms rustc 1.64.0
rust 1.rs 47ms 1.5ms 1.8MB 37ms 0ms rustc 1.64.0
python 2.py 142ms 1.4ms 79.8MB 117ms 13ms pypy 3.8.13
python 1.py 160ms 3.5ms 81.1MB 137ms 13ms pypy 3.8.13
python 1.py 475ms 1.5ms 8.7MB 463ms 0ms pyston 3.8.12
python 2.py 539ms 2.5ms 8.2MB 523ms 0ms pyston 3.8.12
python 1.py 870ms 12ms 7.9MB 853ms 0ms cpython 3.10.7
python 2.py 1251ms 9.8ms 7.3MB 1237ms 0ms cpython 3.10.7

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 895ms 9.9ms 33.8MB 863ms 13ms rustc 1.64.0
python 1.py 2222ms 2.5ms 293.8MB 2007ms 193ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 183ms 1.5ms 9.9MB 170ms 0ms rustc 1.64.0
python 1.py 323ms 3.3ms 144.9MB 263ms 47ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2.rs 461ms 8.7ms 6.7MB 447ms 0ms rustc 1.64.0
rust 1.rs 633ms 88ms 40.8MB 617ms 3ms rustc 1.64.0
python 1.py 3909ms 23ms 391.6MB 3780ms 113ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2.rs 105ms 0.5ms 3.2MB 97ms 0ms rustc 1.64.0
rust 1.rs 130ms 6.1ms 11.7MB 117ms 0ms rustc 1.64.0
python 1.py 859ms 7.3ms 215.9MB 807ms 40ms pypy 3.8.13
python 1.py 1794ms 18ms 86.0MB 1753ms 27ms pyston 3.8.12
python 1.py 3919ms 114ms 85.9MB 3883ms 17ms cpython 3.10.7

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2.rs 1834ms 0.6ms 2.9MB 1740ms 80ms rustc 1.64.0
rust 1.rs 1850ms 0.9ms 2.9MB 1697ms 137ms rustc 1.64.0
python 4.py 2546ms 5.2ms 120.0MB 2507ms 23ms pypy 3.8.13
python 4.py 2766ms 0.4ms 8.6MB 2740ms 7ms cpython 3.10.7
python 4.py 2779ms 0.7ms 9.0MB 2750ms 13ms pyston 3.8.12

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 393ms 0.3ms 2.6MB 377ms 3ms rustc 1.64.0
rust 2.rs 411ms 3.6ms 2.6MB 400ms 0ms rustc 1.64.0
python 4.py 649ms 6.3ms 84.4MB 620ms 10ms pypy 3.8.13
python 4.py 657ms 0.1ms 8.7MB 647ms 0ms pyston 3.8.12
python 4.py 662ms 0.7ms 8.3MB 650ms 0ms cpython 3.10.7

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7.rs 568ms 7.5ms 76.9MB 717ms 17ms rustc 1.64.0
python 1.py 3306ms 4.7ms 263.8MB 3217ms 73ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7.rs 62ms 0.6ms 11.6MB 70ms 0ms rustc 1.64.0
python 1.py 456ms 1.9ms 104.3MB 413ms 23ms pypy 3.8.13
python 1.py 693ms 1.3ms 29.8MB 660ms 13ms pyston 3.8.12
python 1.py 842ms 2.3ms 30.9MB 810ms 17ms cpython 3.10.7

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0.rs 145ms 0.5ms 0.6MB 133ms 0ms rustc 1.64.0
rust 1.rs 1893ms 7.5ms 0.6MB 1883ms 0ms rustc 1.64.0
python 1.py 4446ms 13ms 8.4MB 4433ms 0ms pyston 3.8.12
python 1.py 4743ms 5.5ms 87.4MB 4710ms 17ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.7

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0.rs 38ms 0.0ms 0.7MB 30ms 0ms rustc 1.64.0
rust 1.rs 475ms 2.4ms 0.7MB 467ms 0ms rustc 1.64.0
python 1.py 1131ms 8.0ms 8.4MB 1113ms 0ms pyston 3.8.12
python 1.py 1329ms 0.9ms 84.4MB 1293ms 20ms pypy 3.8.13
python 1.py 1478ms 2.4ms 7.3MB 1470ms 0ms cpython 3.10.7