Rust VS Python benchmarks

Current benchmark data was generated on Sat Mar 29 2025, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -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.)

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 1.2ms 0.0ms 1.8MB 0ms 0ms rustc 1.85.1
rust 1.rs 1.3ms 0.1ms 1.8MB 0ms 0ms rustc 1.87.0-nightly
python 1.py 11ms 0.6ms 7.6MB 0ms 0ms pyston 3.8.12
python 1.py 14ms 1.2ms 8.6MB 10ms 0ms cpython 3.13.2
python 1.py 29ms 0.5ms 51.6MB 8ms 10ms pypy 3.10.16

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 9.rs 247ms 0.7ms 4.7MB 240ms 0ms rustc 1.87.0-nightly
rust 8.rs 310ms 2.1ms 4.7MB 300ms 0ms rustc 1.85.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 9.rs 13ms 0.6ms 2.0MB 10ms 0ms rustc 1.87.0-nightly
rust 8.rs 15ms 0.1ms 1.9MB 10ms 0ms rustc 1.85.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 4-i.rs 164ms 0.4ms 1.9MB 157ms 0ms rustc 1.85.1
rust 7-i.rs 239ms 0.8ms 1.8MB 230ms 0ms rustc 1.85.1
rust 1.rs 240ms 0.7ms 1.8MB 230ms 0ms rustc 1.85.1
rust 3.rs 279ms 0.7ms 1.9MB 270ms 0ms rustc 1.87.0-nightly
rust 2.rs 280ms 0.4ms 1.8MB 270ms 0ms rustc 1.85.1
python 2.py 1361ms 7.5ms 57.9MB 1337ms 10ms pypy 3.10.16
python 1.py 2657ms 16ms 57.2MB 2630ms 7ms pypy 3.10.16
python 1.py timeout 0.0ms 8.6MB 4990ms 0ms cpython 3.13.2
python 2.py timeout 0.0ms 8.8MB 4987ms 0ms cpython 3.13.2
python 1.py timeout 0.0ms 8.3MB 4990ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 8.1MB 4987ms 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 18ms 0.3ms 1.9MB 10ms 0ms rustc 1.85.1
rust 7-i.rs 26ms 0.2ms 1.9MB 20ms 0ms rustc 1.85.1
rust 1.rs 26ms 0.3ms 1.8MB 20ms 0ms rustc 1.85.1
rust 3.rs 30ms 0.2ms 1.8MB 20ms 0ms rustc 1.87.0-nightly
rust 2.rs 31ms 0.8ms 1.6MB 20ms 0ms rustc 1.85.1
python 2.py 180ms 2.3ms 57.9MB 157ms 10ms pypy 3.10.16
python 1.py 303ms 3.6ms 57.1MB 277ms 10ms pypy 3.10.16
python 1.py 945ms 42ms 8.3MB 930ms 0ms pyston 3.8.12
python 2.py 1310ms 7.2ms 8.3MB 1297ms 0ms pyston 3.8.12
python 1.py 3278ms 579ms 8.6MB 3270ms 0ms cpython 3.13.2
python 2.py 3298ms 42ms 8.8MB 3287ms 0ms cpython 3.13.2

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 498ms 6.0ms 2.5MB 1880ms 7ms rustc 1.87.0-nightly
rust 7-m.rs 504ms 3.9ms 2.3MB 1930ms 0ms rustc 1.85.1
rust 8.rs 993ms 0.8ms 2.4MB 983ms 0ms rustc 1.87.0-nightly
rust 2-m.rs 1969ms 2.9ms 2.1MB 7700ms 13ms rustc 1.85.1
rust 7.rs 2108ms 1.5ms 2.0MB 2100ms 0ms rustc 1.85.1
rust 2.rs 4215ms 2.7ms 2.0MB 4207ms 0ms rustc 1.85.1
python 8.py timeout 0.0ms 14.6MB 37ms 7ms cpython 3.13.2
python 8.py timeout 0.0ms 95.4MB 797ms 97ms pypy 3.10.16
python 8.py timeout 0.0ms 14.2MB 33ms 10ms pyston 3.8.12

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 128ms 0.6ms 2.4MB 463ms 3ms rustc 1.87.0-nightly
rust 7-m.rs 130ms 0.5ms 2.1MB 477ms 0ms rustc 1.85.1
rust 8.rs 251ms 0.4ms 2.1MB 240ms 0ms rustc 1.87.0-nightly
rust 2-m.rs 496ms 0.9ms 2.1MB 1913ms 3ms rustc 1.85.1
rust 7.rs 531ms 2.6ms 1.9MB 523ms 0ms rustc 1.85.1
rust 2.rs 1056ms 1.3ms 1.9MB 1050ms 0ms rustc 1.85.1
python 8.py timeout 0.0ms 14.5MB 53ms 13ms cpython 3.13.2
python 8.py timeout 0.0ms 96.1MB 1303ms 183ms pypy 3.10.16
python 8.py timeout 0.0ms 13.5MB 60ms 20ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7-m.rs 36ms 0.5ms 2.1MB 107ms 3ms rustc 1.85.1
rust 8-m.rs 36ms 0.4ms 2.1MB 107ms 3ms rustc 1.87.0-nightly
rust 8.rs 66ms 0.5ms 2.0MB 60ms 0ms rustc 1.87.0-nightly
rust 2-m.rs 129ms 0.7ms 2.1MB 467ms 0ms rustc 1.85.1
rust 7.rs 139ms 5.6ms 1.9MB 133ms 0ms rustc 1.85.1
rust 2.rs 266ms 0.4ms 2.0MB 260ms 0ms rustc 1.85.1
python 8-m.py 1980ms 4.3ms 93.0MB 6417ms 260ms pypy 3.10.16
python 8.py timeout 0.0ms 14.0MB 97ms 13ms cpython 3.13.2
python 8.py timeout 0.0ms 13.2MB 143ms 40ms pyston 3.8.12

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1186ms 0.8ms 96.2MB 1120ms 50ms pypy 3.10.16
rust 4.rs 1269ms 5.9ms 33.6MB 1247ms 7ms rustc 1.85.1
rust 5.rs 1360ms 8.5ms 33.8MB 1333ms 10ms rustc 1.85.1
rust 3.rs 1472ms 50ms 49.8MB 1440ms 17ms rustc 1.85.1
python 1.py timeout 0.0ms 40.8MB 4970ms 17ms cpython 3.13.2
python 1.py timeout 0.0ms 40.6MB 4760ms 220ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 98ms 2.9ms 68.8MB 70ms 13ms pypy 3.10.16
rust 4.rs 120ms 2.2ms 5.6MB 110ms 0ms rustc 1.85.1
rust 5.rs 126ms 3.7ms 5.8MB 113ms 0ms rustc 1.85.1
rust 3.rs 142ms 3.8ms 7.8MB 130ms 0ms rustc 1.85.1
python 1.py 484ms 4.4ms 11.9MB 460ms 10ms pyston 3.8.12
python 1.py 745ms 25ms 12.6MB 737ms 0ms cpython 3.13.2

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3-m.rs 539ms 51ms 9.3MB 2030ms 63ms rustc 1.85.1
rust 5-m.rs 687ms 4.7ms 5.9MB 2610ms 67ms rustc 1.85.1
rust 1-m.rs 946ms 2.8ms 8.4MB 3503ms 200ms rustc 1.85.1
rust 3.rs 1127ms 4.1ms 9.3MB 1080ms 33ms rustc 1.85.1
python 1.py 1218ms 8.4ms 107.6MB 1167ms 40ms pypy 3.10.16
rust 4.rs 1922ms 19ms 7.4MB 1910ms 0ms rustc 1.85.1
python 1.py 2748ms 76ms 25.1MB 2727ms 7ms cpython 3.13.2
python 1.py timeout 0.0ms 17.3MB 4980ms 10ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-m.rs 54ms 3.9ms 3.5MB 163ms 10ms rustc 1.85.1
rust 3-m.rs 59ms 5.9ms 4.1MB 183ms 13ms rustc 1.85.1
rust 1-m.rs 73ms 1.9ms 3.9MB 237ms 17ms rustc 1.85.1
rust 3.rs 74ms 0.3ms 4.0MB 60ms 0ms rustc 1.85.1
rust 4.rs 117ms 2.3ms 3.3MB 110ms 0ms rustc 1.85.1
python 1.py 222ms 2.1ms 86.9MB 187ms 17ms pypy 3.10.16
python 1.py 239ms 4.5ms 20.4MB 223ms 3ms cpython 3.13.2
python 1.py 657ms 9.5ms 16.8MB 640ms 7ms pyston 3.8.12

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 122ms 0.5ms 3.6MB 110ms 0ms rustc 1.85.1
python 1.py 252ms 1.3ms 83.6MB 217ms 23ms pypy 3.10.16
python 1.py 362ms 3.6ms 12.6MB 343ms 0ms cpython 3.13.2
rust 2.rs 425ms 2.9ms 3.6MB 413ms 0ms rustc 1.85.1
python 1.py 2008ms 3.3ms 9.6MB 1993ms 0ms pyston 3.8.12

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 34ms 0.2ms 2.9MB 27ms 0ms rustc 1.85.1
rust 2.rs 78ms 1.4ms 3.0MB 70ms 0ms rustc 1.85.1
python 1.py 101ms 2.1ms 63.3MB 73ms 10ms pypy 3.10.16
python 1.py 110ms 2.5ms 11.6MB 97ms 0ms cpython 3.13.2
python 1.py 351ms 2.5ms 8.9MB 340ms 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 412ms 3.0ms 2.0MB 1580ms 0ms rustc 1.85.1
rust 5-m.rs 597ms 46ms 2.0MB 2177ms 0ms rustc 1.85.1
rust 2-im.rs 631ms 4.2ms 2.0MB 2423ms 0ms rustc 1.85.1
rust 1-m.rs 986ms 25ms 2.1MB 3787ms 0ms rustc 1.85.1
rust 3-i.rs 1506ms 13ms 1.9MB 1497ms 0ms rustc 1.85.1
rust 2-i.rs 1758ms 0.6ms 1.8MB 1750ms 0ms rustc 1.85.1
rust 1.rs 2692ms 6.5ms 1.8MB 2683ms 0ms rustc 1.85.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 3-im.rs 38ms 0.2ms 2.0MB 127ms 0ms rustc 1.85.1
rust 5-m.rs 53ms 1.0ms 2.0MB 173ms 0ms rustc 1.85.1
rust 2-im.rs 60ms 0.3ms 2.0MB 200ms 0ms rustc 1.85.1
rust 1-m.rs 87ms 0.9ms 2.0MB 307ms 0ms rustc 1.85.1
rust 3-i.rs 125ms 0.4ms 1.9MB 120ms 0ms rustc 1.85.1
rust 2-i.rs 150ms 0.6ms 1.8MB 140ms 0ms rustc 1.85.1
rust 1.rs 227ms 2.5ms 1.8MB 217ms 0ms rustc 1.85.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5c-m.rs 92ms 2.8ms 3.2MB 263ms 0ms rustc 1.85.1
rust 5-m.rs 93ms 0.6ms 3.2MB 293ms 0ms rustc 1.85.1
rust 1c.rs 163ms 0.3ms 1.8MB 150ms 0ms rustc 1.85.1
rust 1.rs 196ms 0.7ms 1.9MB 190ms 0ms rustc 1.85.1
python 1.py 1871ms 16ms 88.8MB 1820ms 37ms pypy 3.10.16
python 5-m.py 2286ms 25ms 65.4MB 3523ms 857ms pypy 3.10.16
python 5-m.py 2628ms 276ms 12.5MB 3513ms 1170ms pyston 3.8.12
python 1.py 3017ms 11ms 8.1MB 3000ms 0ms pyston 3.8.12
python 5-m.py 3415ms 25ms 13.6MB 4547ms 940ms cpython 3.13.2
python 1.py 4761ms 15ms 8.8MB 4747ms 0ms cpython 3.13.2

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5c-m.rs 17ms 0.2ms 3.2MB 23ms 0ms rustc 1.85.1
rust 5-m.rs 17ms 0.5ms 3.4MB 30ms 0ms rustc 1.85.1
rust 1c.rs 19ms 0.1ms 1.9MB 10ms 0ms rustc 1.85.1
rust 1.rs 22ms 0.6ms 1.9MB 10ms 0ms rustc 1.85.1
python 1.py 253ms 1.6ms 63.4MB 220ms 20ms pypy 3.10.16
python 1.py 314ms 5.5ms 8.1MB 303ms 0ms pyston 3.8.12
python 5-m.py 336ms 9.5ms 12.5MB 440ms 160ms pyston 3.8.12
python 5-m.py 404ms 2.2ms 13.5MB 487ms 137ms cpython 3.13.2
python 5-m.py 447ms 0.8ms 65.4MB 747ms 307ms pypy 3.10.16
python 1.py 490ms 12ms 8.8MB 477ms 0ms cpython 3.13.2

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2-http2.rs 261ms 77ms 47.4MB 587ms 277ms rustc 1.85.1
rust 1-m.rs 286ms 51ms 73.4MB 170ms 473ms rustc 1.85.1
rust 2-m.rs 379ms 33ms 71.4MB 243ms 883ms rustc 1.85.1
rust 1-http2.rs 786ms 142ms 69.0MB 2120ms 697ms rustc 1.85.1
python 1.py 2324ms 184ms 26.6MB 1127ms 1567ms pyston 3.8.12
python 1.py 2773ms 352ms 27.4MB 1603ms 1647ms cpython 3.13.2
python 1.py 4799ms 63ms 105.0MB 2877ms 1247ms pypy 3.10.16

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1-m.rs 40ms 2.0ms 14.0MB 20ms 60ms rustc 1.85.1
rust 2-m.rs 86ms 4.3ms 22.4MB 33ms 177ms rustc 1.85.1
rust 2-http2.rs 206ms 41ms 23.6MB 503ms 180ms rustc 1.85.1
rust 1-http2.rs 255ms 49ms 28.0MB 653ms 227ms rustc 1.85.1
python 1.py 1102ms 29ms 21.4MB 230ms 297ms pyston 3.8.12
python 1.py 1123ms 32ms 22.8MB 323ms 273ms cpython 3.13.2
python 1.py 1786ms 128ms 85.1MB 727ms 237ms pypy 3.10.16

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-i.rs 28ms 0.3ms 9.8MB 20ms 0ms rustc 1.85.1
rust 4-i.rs 33ms 1.2ms 7.9MB 20ms 0ms rustc 1.85.1
rust 2.rs 60ms 0.3ms 33.8MB 40ms 10ms rustc 1.85.1
rust 3.rs 63ms 3.6ms 32.0MB 43ms 7ms rustc 1.85.1
rust 1.rs 101ms 1.6ms 67.4MB 60ms 30ms rustc 1.85.1
python 1.py 206ms 5.8ms 38.2MB 173ms 20ms pyston 3.8.12
python 1.py 223ms 2.0ms 38.6MB 197ms 13ms cpython 3.13.2
python 1.py 299ms 2.4ms 89.5MB 267ms 20ms pypy 3.10.16

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-i.rs 210ms 3.7ms 52.6MB 190ms 7ms rustc 1.85.1
rust 4-i.rs 262ms 3.9ms 54.4MB 207ms 47ms rustc 1.85.1
rust 2.rs 408ms 3.8ms 237.6MB 303ms 93ms rustc 1.85.1
rust 3.rs 410ms 6.5ms 237.6MB 303ms 93ms rustc 1.85.1
rust 1.rs 696ms 5.6ms 550.2MB 450ms 230ms rustc 1.85.1
python 1.py 1848ms 16ms 220.5MB 1673ms 163ms pyston 3.8.12
python 1.py 1936ms 8.2ms 221.4MB 1830ms 90ms cpython 3.13.2
python 1.py 1937ms 15ms 222.2MB 1857ms 67ms pypy 3.10.16

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 223ms 8.6ms 25.4MB 680ms 3ms rustc 1.85.1
rust 8.rs 481ms 8.4ms 22.4MB 457ms 7ms rustc 1.85.1
python 3-m.py 2432ms 27ms 136.6MB 8243ms 337ms pypy 3.10.16
python 3-m.py 3270ms 50ms 34.3MB 12393ms 110ms pyston 3.8.12
python 3.py timeout 0.0ms 35.7MB 93ms 20ms cpython 3.13.2

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 31ms 1.7ms 14.7MB 67ms 0ms rustc 1.85.1
rust 8.rs 60ms 0.7ms 11.4MB 50ms 0ms rustc 1.85.1
python 3-m.py 387ms 3.4ms 76.1MB 970ms 167ms pypy 3.10.16
python 3-m.py 400ms 3.4ms 14.3MB 1323ms 73ms pyston 3.8.12
python 3-m.py 664ms 4.3ms 15.1MB 2327ms 57ms cpython 3.13.2

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 36ms 2.8ms 1.8MB 27ms 0ms rustc 1.85.1
rust 1.rs 52ms 14ms 1.9MB 43ms 0ms rustc 1.85.1
python 2.py 146ms 1.8ms 58.3MB 120ms 10ms pypy 3.10.16
python 1.py 181ms 2.9ms 59.3MB 153ms 13ms pypy 3.10.16
python 1.py 726ms 9.4ms 8.9MB 713ms 0ms pyston 3.8.12
python 2.py 831ms 7.8ms 8.5MB 817ms 0ms pyston 3.8.12
python 1.py 1180ms 49ms 9.3MB 1170ms 0ms cpython 3.13.2
python 2.py 1336ms 19ms 9.0MB 1323ms 0ms cpython 3.13.2

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 137ms 7.5ms 1.9MB 130ms 0ms rustc 1.85.1
rust 1.rs 189ms 17ms 2.0MB 180ms 0ms rustc 1.85.1
python 2.py 342ms 5.4ms 59.2MB 313ms 10ms pypy 3.10.16
python 1.py 379ms 2.8ms 60.3MB 350ms 13ms pypy 3.10.16
python 1.py 2144ms 4.0ms 8.9MB 2130ms 0ms pyston 3.8.12
python 2.py 2479ms 16ms 8.5MB 2463ms 0ms pyston 3.8.12
python 1.py 3519ms 155ms 9.3MB 3507ms 0ms cpython 3.13.2
python 2.py 3929ms 97ms 9.0MB 3917ms 0ms cpython 3.13.2

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 23ms 0.6ms 1.8MB 17ms 0ms rustc 1.85.1
rust 1.rs 33ms 3.2ms 1.9MB 23ms 0ms rustc 1.85.1
python 2.py 105ms 2.1ms 58.1MB 83ms 10ms pypy 3.10.16
python 1.py 122ms 3.8ms 58.7MB 97ms 10ms pypy 3.10.16
python 1.py 348ms 2.4ms 8.5MB 337ms 0ms pyston 3.8.12
python 2.py 387ms 3.3ms 8.1MB 373ms 0ms pyston 3.8.12
python 1.py 551ms 21ms 9.0MB 540ms 0ms cpython 3.13.2
python 2.py 640ms 9.1ms 8.8MB 627ms 0ms cpython 3.13.2

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 717ms 11ms 33.8MB 693ms 10ms rustc 1.85.1
python 1.py 2248ms 18ms 202.7MB 2120ms 107ms pypy 3.10.16
python 1.py timeout 0.0ms 93.9MB 4960ms 27ms cpython 3.13.2
python 1.py timeout 0.0ms 130.4MB 4937ms 43ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 151ms 0.9ms 9.8MB 140ms 0ms rustc 1.85.1
python 1.py 386ms 6.0ms 105.2MB 323ms 47ms pypy 3.10.16
python 1.py 3142ms 32ms 37.1MB 3113ms 13ms cpython 3.13.2
python 1.py timeout 0.0ms 48.8MB 4970ms 20ms pyston 3.8.12

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 2.rs 311ms 3.4ms 6.6MB 300ms 0ms rustc 1.85.1
rust 1.rs 351ms 9.0ms 40.9MB 333ms 0ms rustc 1.85.1
python 1.py 2599ms 1.4ms 369.5MB 2530ms 57ms pypy 3.10.16
python 2.py 3039ms 28ms 633.0MB 2870ms 157ms pyston 3.8.12
python 1.py 4752ms 17ms 320.4MB 4690ms 47ms pyston 3.8.12
python 1.py timeout 0.0ms 321.1MB 4957ms 27ms cpython 3.13.2
python 2.py timeout 0.0ms 633.6MB 4830ms 153ms cpython 3.13.2
python 2.py timeout 0.0ms 959.9MB 4710ms 273ms pypy 3.10.16

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 74ms 3.7ms 11.6MB 63ms 0ms rustc 1.85.1
rust 2.rs 78ms 0.1ms 2.9MB 70ms 0ms rustc 1.85.1
python 1.py 540ms 8.7ms 135.2MB 507ms 20ms pypy 3.10.16
python 2.py 769ms 37ms 164.2MB 727ms 30ms pyston 3.8.12
python 1.py 1094ms 28ms 86.0MB 1070ms 7ms pyston 3.8.12
python 2.py 1513ms 103ms 164.8MB 1477ms 23ms cpython 3.13.2
python 2.py 1536ms 8.6ms 290.2MB 1450ms 70ms pypy 3.10.16
python 1.py 2723ms 5.6ms 86.8MB 2700ms 10ms cpython 3.13.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 1581ms 20ms 2.8MB 1350ms 213ms rustc 1.85.1
rust 2.rs 1744ms 14ms 2.7MB 1643ms 83ms rustc 1.85.1
python 4.py 1916ms 3.0ms 8.9MB 1873ms 30ms pyston 3.8.12
python 4.py 1946ms 3.1ms 9.3MB 1893ms 37ms cpython 3.13.2
python 4.py 2189ms 9.6ms 89.4MB 2150ms 27ms pypy 3.10.16

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 324ms 1.5ms 2.4MB 300ms 10ms rustc 1.85.1
rust 2.rs 388ms 2.8ms 2.4MB 377ms 0ms rustc 1.85.1
python 4.py 452ms 3.0ms 8.6MB 440ms 0ms pyston 3.8.12
python 4.py 465ms 2.7ms 9.1MB 453ms 0ms cpython 3.13.2
python 4.py 559ms 4.1ms 83.9MB 520ms 23ms pypy 3.10.16

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7.rs 439ms 2.1ms 77.6MB 443ms 17ms rustc 1.85.1
python 1.py 2255ms 3.3ms 243.1MB 2197ms 40ms pypy 3.10.16
python 1.py 4775ms 5.8ms 225.9MB 4573ms 187ms pyston 3.8.12
python 1.py timeout 0.0ms 138.1MB 4930ms 53ms cpython 3.13.2

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7.rs 49ms 1.3ms 12.6MB 43ms 0ms rustc 1.85.1
python 1.py 330ms 4.3ms 85.6MB 293ms 20ms pypy 3.10.16
python 1.py 501ms 1.3ms 36.2MB 470ms 17ms pyston 3.8.12
python 1.py 607ms 4.5ms 31.1MB 573ms 23ms cpython 3.13.2

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0.rs 119ms 2.9ms 1.9MB 110ms 0ms rustc 1.85.1
rust 1.rs 1426ms 5.0ms 1.9MB 1417ms 0ms rustc 1.85.1
python 1.py 3200ms 57ms 8.3MB 3193ms 0ms pyston 3.8.12
python 1.py 3539ms 28ms 74.3MB 3503ms 27ms pypy 3.10.16
python 1.py 3863ms 72ms 8.6MB 3847ms 0ms cpython 3.13.2

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0.rs 32ms 2.2ms 1.9MB 23ms 0ms rustc 1.85.1
rust 1.rs 366ms 4.5ms 1.9MB 357ms 0ms rustc 1.85.1
python 1.py 808ms 5.8ms 8.3MB 797ms 0ms pyston 3.8.12
python 1.py 990ms 9.8ms 8.6MB 980ms 0ms cpython 3.13.2
python 1.py 1000ms 9.6ms 67.3MB 973ms 17ms pypy 3.10.16