Python VS Rust benchmarks

Current benchmark data was generated on Mon Dec 30 2024, 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1166ms 9.2ms 95.7MB 1100ms 50ms pypy 3.10.14
rust 4.rs 1245ms 9.2ms 33.8MB 1227ms 3ms rustc 1.83.0
rust 5.rs 1324ms 7.0ms 33.8MB 1297ms 10ms rustc 1.83.0
rust 3.rs 1436ms 25ms 49.8MB 1403ms 17ms rustc 1.83.0
python 1.py timeout 0.0ms 40.9MB 4967ms 17ms cpython 3.13.1
python 1.py timeout 0.0ms 40.5MB 4760ms 223ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 96ms 2.2ms 67.9MB 63ms 20ms pypy 3.10.14
rust 4.rs 118ms 2.7ms 5.8MB 107ms 0ms rustc 1.83.0
rust 5.rs 126ms 0.6ms 5.8MB 120ms 0ms rustc 1.83.0
rust 3.rs 141ms 4.7ms 7.8MB 127ms 0ms rustc 1.83.0
python 1.py 474ms 5.7ms 11.9MB 450ms 7ms pyston 3.8.12
python 1.py 709ms 7.3ms 12.6MB 697ms 0ms cpython 3.13.1

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-m.rs 470ms 226ms 7.6MB 1753ms 53ms rustc 1.83.0
rust 3-m.rs 539ms 55ms 11.1MB 2013ms 73ms rustc 1.83.0
rust 1-m.rs 956ms 11ms 12.4MB 3470ms 257ms rustc 1.83.0
rust 3.rs 1141ms 20ms 9.3MB 1100ms 27ms rustc 1.83.0
python 1.py 1177ms 7.4ms 102.5MB 1120ms 40ms pypy 3.10.14
rust 4.rs 1902ms 10ms 7.4MB 1887ms 3ms rustc 1.83.0
python 1.py timeout 0.0ms 21.3MB 4973ms 7ms cpython 3.13.1
python 1.py timeout 0.0ms 17.3MB 4980ms 3ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-m.rs 51ms 4.2ms 5.3MB 150ms 10ms rustc 1.83.0
rust 3-m.rs 53ms 2.6ms 6.3MB 153ms 17ms rustc 1.83.0
rust 3.rs 74ms 1.0ms 4.0MB 60ms 0ms rustc 1.83.0
rust 1-m.rs 87ms 9.5ms 7.8MB 253ms 43ms rustc 1.83.0
rust 4.rs 116ms 1.8ms 3.3MB 107ms 0ms rustc 1.83.0
python 1.py 218ms 5.6ms 84.5MB 167ms 37ms pypy 3.10.14
python 1.py 587ms 33ms 20.5MB 567ms 3ms cpython 3.13.1
python 1.py 656ms 19ms 16.8MB 630ms 3ms pyston 3.8.12

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 115ms 0.4ms 3.6MB 100ms 0ms rustc 1.83.0
python 1.py 246ms 0.5ms 82.9MB 210ms 17ms pypy 3.10.14
python 1.py 360ms 0.4ms 12.5MB 343ms 3ms cpython 3.13.1
rust 2.rs 412ms 4.1ms 3.6MB 403ms 0ms rustc 1.83.0
python 1.py 1994ms 2.7ms 9.6MB 1980ms 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 1.7ms 2.9MB 27ms 0ms rustc 1.83.0
rust 2.rs 74ms 0.1ms 3.0MB 63ms 0ms rustc 1.83.0
python 1.py 97ms 0.8ms 62.8MB 77ms 10ms pypy 3.10.14
python 1.py 112ms 5.9ms 12.0MB 100ms 0ms cpython 3.13.1
python 1.py 345ms 0.6ms 8.8MB 330ms 0ms pyston 3.8.12

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5c-m.rs 89ms 1.0ms 8.3MB 247ms 0ms rustc 1.83.0
rust 5-m.rs 98ms 1.1ms 4.8MB 323ms 3ms rustc 1.83.0
rust 1c.rs 162ms 0.9ms 1.9MB 150ms 0ms rustc 1.83.0
rust 1.rs 196ms 0.6ms 1.9MB 180ms 0ms rustc 1.83.0
python 1.py 1896ms 11ms 88.3MB 1847ms 33ms pypy 3.10.14
python 5-m.py 2474ms 26ms 12.5MB 3627ms 973ms pyston 3.8.12
python 5-m.py 2831ms 4.6ms 64.9MB 4040ms 807ms pypy 3.10.14
python 1.py 2999ms 24ms 8.1MB 2983ms 0ms pyston 3.8.12
python 5-m.py 3390ms 14ms 13.9MB 4597ms 887ms cpython 3.13.1
python 1.py 4550ms 39ms 8.6MB 4537ms 0ms cpython 3.13.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5c-m.rs 16ms 0.5ms 4.8MB 20ms 0ms rustc 1.83.0
rust 5-m.rs 17ms 1.2ms 4.8MB 27ms 0ms rustc 1.83.0
rust 1c.rs 19ms 0.3ms 1.9MB 10ms 0ms rustc 1.83.0
rust 1.rs 22ms 0.1ms 1.9MB 10ms 0ms rustc 1.83.0
python 1.py 252ms 5.8ms 63.5MB 227ms 17ms pypy 3.10.14
python 1.py 310ms 1.9ms 8.1MB 297ms 0ms pyston 3.8.12
python 5-m.py 311ms 4.2ms 12.5MB 410ms 137ms pyston 3.8.12
python 5-m.py 397ms 2.8ms 13.8MB 483ms 127ms cpython 3.13.1
python 1.py 494ms 18ms 8.6MB 480ms 0ms cpython 3.13.1
python 5-m.py 539ms 0.3ms 65.0MB 810ms 283ms pypy 3.10.14

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.9MB 0ms 0ms rustc 1.85.0-nightly
rust 1.rs 1.3ms 0.1ms 1.8MB 0ms 0ms rustc 1.83.0
python 1.py 11ms 1.0ms 7.6MB 0ms 0ms pyston 3.8.12
python 1.py 13ms 1.3ms 8.6MB 10ms 0ms cpython 3.13.1
python 1.py 28ms 0.7ms 51.0MB 10ms 8ms pypy 3.10.14

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1-m.rs 283ms 65ms 45.2MB 110ms 320ms rustc 1.83.0
rust 2-http2.rs 333ms 40ms 59.8MB 523ms 420ms rustc 1.83.0
rust 1-http2.rs 417ms 64ms 66.6MB 580ms 613ms rustc 1.83.0
rust 2-m.rs 453ms 57ms 75.7MB 217ms 810ms rustc 1.83.0
python 1.py 2122ms 18ms 36.4MB 1073ms 1570ms pyston 3.8.12
python 1.py 2389ms 181ms 33.4MB 1510ms 1657ms cpython 3.13.1
python 1.py 4757ms 102ms 107.1MB 2770ms 1207ms pypy 3.10.14

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 71ms 14ms 16.6MB 7ms 80ms rustc 1.83.0
rust 2-m.rs 121ms 5.1ms 35.6MB 43ms 173ms rustc 1.83.0
rust 1-http2.rs 186ms 23ms 28.2MB 303ms 177ms rustc 1.83.0
rust 2-http2.rs 204ms 18ms 34.0MB 410ms 163ms rustc 1.83.0
python 1.py 1147ms 80ms 28.7MB 303ms 280ms cpython 3.13.1
python 1.py 1183ms 95ms 31.0MB 233ms 270ms pyston 3.8.12
python 1.py 1563ms 329ms 89.5MB 690ms 227ms pypy 3.10.14

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-i.rs 30ms 1.2ms 9.8MB 20ms 0ms rustc 1.83.0
rust 4-i.rs 33ms 2.7ms 7.9MB 20ms 0ms rustc 1.83.0
rust 3.rs 62ms 1.7ms 33.8MB 40ms 10ms rustc 1.83.0
rust 2.rs 62ms 0.1ms 35.5MB 40ms 10ms rustc 1.83.0
rust 1.rs 102ms 1.9ms 69.3MB 57ms 33ms rustc 1.83.0
python 1.py 192ms 1.0ms 38.7MB 160ms 20ms pyston 3.8.12
python 1.py 215ms 5.5ms 38.6MB 193ms 7ms cpython 3.13.1
python 1.py 292ms 3.8ms 87.3MB 250ms 30ms pypy 3.10.14

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 5-i.rs 208ms 1.9ms 52.8MB 183ms 7ms rustc 1.83.0
rust 4-i.rs 265ms 3.2ms 54.5MB 207ms 47ms rustc 1.83.0
rust 3.rs 412ms 1.5ms 238.3MB 300ms 97ms rustc 1.83.0
rust 2.rs 415ms 3.6ms 237.7MB 300ms 97ms rustc 1.83.0
rust 1.rs 694ms 8.1ms 551.8MB 440ms 237ms rustc 1.83.0
python 1.py 1817ms 12ms 220.5MB 1627ms 177ms pyston 3.8.12
python 1.py 1901ms 12ms 221.8MB 1813ms 73ms pypy 3.10.14
python 1.py 1904ms 4.2ms 221.4MB 1823ms 67ms cpython 3.13.1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 225ms 9.9ms 30.6MB 663ms 3ms rustc 1.83.0
rust 8.rs 471ms 6.3ms 24.0MB 450ms 7ms rustc 1.83.0
python 3-m.py 2278ms 16ms 137.7MB 7713ms 340ms pypy 3.10.14
python 3-m.py 3081ms 29ms 34.0MB 11623ms 120ms pyston 3.8.12
python 3.py timeout 0.0ms 35.2MB 90ms 23ms cpython 3.13.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 33ms 1.6ms 16.7MB 60ms 3ms rustc 1.83.0
rust 8.rs 61ms 1.4ms 11.4MB 43ms 0ms rustc 1.83.0
python 3-m.py 377ms 2.5ms 77.5MB 937ms 173ms pypy 3.10.14
python 3-m.py 392ms 3.6ms 17.7MB 1273ms 83ms pyston 3.8.12
python 3-m.py 645ms 2.8ms 17.1MB 2247ms 77ms cpython 3.13.1

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 32ms 2.1ms 1.9MB 23ms 0ms rustc 1.83.0
rust 1.rs 46ms 1.5ms 2.0MB 37ms 0ms rustc 1.83.0
python 2.py 147ms 1.4ms 57.9MB 123ms 10ms pypy 3.10.14
python 1.py 178ms 5.0ms 59.5MB 153ms 10ms pypy 3.10.14
python 1.py 726ms 18ms 8.9MB 713ms 0ms pyston 3.8.12
python 2.py 833ms 14ms 8.5MB 827ms 0ms pyston 3.8.12
python 1.py 1123ms 16ms 9.4MB 1113ms 0ms cpython 3.13.1
python 2.py 1312ms 12ms 9.0MB 1300ms 0ms cpython 3.13.1

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 144ms 14ms 1.9MB 133ms 0ms rustc 1.83.0
rust 1.rs 187ms 10ms 2.0MB 177ms 0ms rustc 1.83.0
python 2.py 345ms 7.5ms 58.9MB 317ms 13ms pypy 3.10.14
python 1.py 374ms 2.4ms 60.4MB 347ms 10ms pypy 3.10.14
python 1.py 2112ms 9.0ms 8.9MB 2097ms 0ms pyston 3.8.12
python 2.py 2470ms 27ms 8.5MB 2453ms 0ms pyston 3.8.12
python 1.py 3297ms 22ms 9.4MB 3280ms 0ms cpython 3.13.1
python 2.py 3873ms 38ms 9.0MB 3857ms 3ms cpython 3.13.1

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0-unsafe.rs 23ms 0.8ms 1.9MB 10ms 0ms rustc 1.83.0
rust 1.rs 29ms 2.3ms 1.9MB 20ms 0ms rustc 1.83.0
python 2.py 104ms 2.3ms 57.8MB 77ms 10ms pypy 3.10.14
python 1.py 119ms 0.8ms 58.5MB 90ms 13ms pypy 3.10.14
python 1.py 342ms 1.9ms 8.5MB 330ms 0ms pyston 3.8.12
python 2.py 384ms 1.2ms 8.1MB 370ms 0ms pyston 3.8.12
python 1.py 527ms 8.2ms 9.0MB 510ms 0ms cpython 3.13.1
python 2.py 638ms 14ms 8.6MB 623ms 0ms cpython 3.13.1

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 699ms 10ms 33.8MB 673ms 10ms rustc 1.83.0
python 1.py 2228ms 12ms 210.0MB 2107ms 107ms pypy 3.10.14
python 1.py timeout 0.0ms 93.9MB 4957ms 30ms cpython 3.13.1
python 1.py timeout 0.0ms 130.4MB 4930ms 50ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 148ms 0.5ms 9.8MB 140ms 0ms rustc 1.83.0
python 1.py 381ms 4.2ms 103.6MB 330ms 37ms pypy 3.10.14
python 1.py 2924ms 26ms 36.9MB 2890ms 20ms cpython 3.13.1
python 1.py timeout 0.0ms 48.8MB 4940ms 40ms pyston 3.8.12

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 4-i.rs 180ms 29ms 1.8MB 170ms 0ms rustc 1.83.0
rust 7-i.rs 236ms 1.2ms 1.8MB 223ms 0ms rustc 1.83.0
rust 1.rs 238ms 0.9ms 1.8MB 230ms 0ms rustc 1.83.0
rust 2.rs 278ms 0.4ms 1.8MB 270ms 0ms rustc 1.83.0
rust 3.rs 280ms 0.1ms 1.9MB 270ms 0ms rustc 1.85.0-nightly
python 2.py 1353ms 12ms 59.9MB 1337ms 3ms pypy 3.10.14
python 1.py 2633ms 14ms 56.6MB 2607ms 13ms pypy 3.10.14
python 1.py timeout 0.0ms 8.6MB 4990ms 0ms cpython 3.13.1
python 2.py timeout 0.0ms 8.8MB 4987ms 0ms cpython 3.13.1
python 1.py timeout 0.0ms 8.3MB 4983ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 8.1MB 4983ms 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.1ms 1.8MB 10ms 0ms rustc 1.83.0
rust 7-i.rs 26ms 0.2ms 1.8MB 17ms 0ms rustc 1.83.0
rust 1.rs 26ms 0.3ms 1.8MB 17ms 0ms rustc 1.83.0
rust 2.rs 30ms 0.2ms 1.8MB 20ms 0ms rustc 1.83.0
rust 3.rs 30ms 0.2ms 1.8MB 20ms 0ms rustc 1.85.0-nightly
python 2.py 177ms 3.9ms 57.6MB 153ms 10ms pypy 3.10.14
python 1.py 305ms 2.4ms 56.6MB 283ms 7ms pypy 3.10.14
python 1.py 946ms 19ms 8.3MB 937ms 0ms pyston 3.8.12
python 2.py 1298ms 20ms 8.1MB 1280ms 0ms pyston 3.8.12
python 1.py 2997ms 82ms 8.8MB 2987ms 0ms cpython 3.13.1
python 2.py 3190ms 235ms 8.8MB 3177ms 0ms cpython 3.13.1

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 298ms 8.3ms 40.9MB 280ms 0ms rustc 1.83.0
rust 2.rs 321ms 2.9ms 6.6MB 303ms 0ms rustc 1.83.0
python 1.py 2535ms 9.1ms 369.1MB 2463ms 57ms pypy 3.10.14
python 2.py 2952ms 18ms 633.0MB 2773ms 163ms pyston 3.8.12
python 1.py 4904ms 18ms 320.4MB 4843ms 43ms pyston 3.8.12
python 1.py timeout 0.0ms 321.1MB 4960ms 27ms cpython 3.13.1
python 2.py timeout 0.0ms 633.5MB 4817ms 170ms cpython 3.13.1
python 2.py timeout 0.0ms 959.4MB 4733ms 253ms pypy 3.10.14

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 60ms 1.9ms 11.6MB 47ms 0ms rustc 1.83.0
rust 2.rs 81ms 1.2ms 2.9MB 70ms 0ms rustc 1.83.0
python 1.py 526ms 8.6ms 134.6MB 483ms 27ms pypy 3.10.14
python 2.py 710ms 4.5ms 164.2MB 667ms 27ms pyston 3.8.12
python 1.py 1093ms 7.3ms 86.0MB 1067ms 10ms pyston 3.8.12
python 2.py 1416ms 3.8ms 165.0MB 1367ms 30ms cpython 3.13.1
python 2.py 1536ms 11ms 289.6MB 1443ms 77ms pypy 3.10.14
python 1.py 2657ms 8.6ms 86.8MB 2630ms 10ms cpython 3.13.1

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 1567ms 4.0ms 2.7MB 1343ms 203ms rustc 1.83.0
rust 2.rs 1706ms 7.7ms 2.8MB 1617ms 73ms rustc 1.83.0
python 4.py 1916ms 8.2ms 8.9MB 1867ms 33ms pyston 3.8.12
python 4.py 1980ms 6.9ms 9.4MB 1907ms 53ms cpython 3.13.1
python 4.py 2133ms 8.9ms 89.1MB 2097ms 17ms pypy 3.10.14

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 1.rs 324ms 4.3ms 2.4MB 290ms 20ms rustc 1.83.0
rust 2.rs 381ms 3.5ms 2.5MB 367ms 0ms rustc 1.83.0
python 4.py 454ms 5.7ms 8.6MB 440ms 0ms pyston 3.8.12
python 4.py 467ms 0.8ms 9.0MB 453ms 0ms cpython 3.13.1
python 4.py 544ms 14ms 83.6MB 503ms 23ms pypy 3.10.14

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7.rs 434ms 2.7ms 78.4MB 433ms 20ms rustc 1.83.0
python 1.py 2230ms 6.1ms 244.1MB 2163ms 50ms pypy 3.10.14
python 1.py 4730ms 18ms 226.2MB 4550ms 160ms pyston 3.8.12
python 1.py timeout 0.0ms 111.6MB 4950ms 37ms cpython 3.13.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 7.rs 50ms 0.2ms 11.4MB 40ms 3ms rustc 1.83.0
python 1.py 330ms 1.4ms 84.8MB 287ms 30ms pypy 3.10.14
python 1.py 492ms 4.4ms 30.4MB 460ms 17ms pyston 3.8.12
python 1.py 628ms 2.8ms 31.0MB 590ms 27ms cpython 3.13.1

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0.rs 117ms 3.1ms 1.9MB 110ms 0ms rustc 1.83.0
rust 1.rs 1406ms 12ms 2.0MB 1397ms 0ms rustc 1.83.0
python 1.py 3167ms 4.3ms 8.4MB 3150ms 0ms pyston 3.8.12
python 1.py 3716ms 30ms 74.6MB 3673ms 27ms pypy 3.10.14
python 1.py 3799ms 33ms 8.8MB 3787ms 0ms cpython 3.13.1

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 0.rs 33ms 1.6ms 1.9MB 23ms 0ms rustc 1.83.0
rust 1.rs 355ms 5.5ms 1.9MB 343ms 0ms rustc 1.83.0
python 1.py 799ms 1.5ms 8.3MB 783ms 0ms pyston 3.8.12
python 1.py 964ms 6.9ms 8.6MB 950ms 0ms cpython 3.13.1
python 1.py 1028ms 8.3ms 67.5MB 1000ms 13ms pypy 3.10.14

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 496ms 0.3ms 4.6MB 1903ms 3ms rustc 1.85.0-nightly
rust 7-m.rs 497ms 0.4ms 4.2MB 1913ms 7ms rustc 1.83.0
rust 8.rs 1007ms 0.3ms 2.4MB 993ms 0ms rustc 1.85.0-nightly
rust 2-m.rs 1948ms 0.9ms 6.2MB 7640ms 7ms rustc 1.83.0
rust 7.rs 2100ms 7.2ms 1.9MB 2090ms 0ms rustc 1.83.0
rust 2.rs 4189ms 4.1ms 2.0MB 4177ms 0ms rustc 1.83.0
python 8.py timeout 0.0ms 16.7MB 57ms 7ms cpython 3.13.1
python 8.py timeout 0.0ms 100.1MB 863ms 163ms pypy 3.10.14
python 8.py timeout 0.0ms 18.1MB 73ms 20ms 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.2ms 4.2MB 450ms 13ms rustc 1.85.0-nightly
rust 7-m.rs 128ms 0.1ms 4.1MB 473ms 0ms rustc 1.83.0
rust 8.rs 254ms 0.5ms 2.3MB 247ms 0ms rustc 1.85.0-nightly
rust 2-m.rs 492ms 2.9ms 4.1MB 1880ms 0ms rustc 1.83.0
rust 7.rs 531ms 2.9ms 1.8MB 520ms 0ms rustc 1.83.0
rust 2.rs 1048ms 0.7ms 1.9MB 1040ms 0ms rustc 1.83.0
python 8.py timeout 0.0ms 16.5MB 103ms 17ms cpython 3.13.1
python 8.py timeout 0.0ms 100.0MB 1510ms 497ms pypy 3.10.14
python 8.py timeout 0.0ms 17.8MB 127ms 43ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
rust 8-m.rs 35ms 0.4ms 4.2MB 113ms 0ms rustc 1.85.0-nightly
rust 7-m.rs 36ms 0.4ms 4.1MB 107ms 3ms rustc 1.83.0
rust 8.rs 66ms 0.3ms 2.1MB 57ms 0ms rustc 1.85.0-nightly
rust 2-m.rs 128ms 0.5ms 4.1MB 463ms 0ms rustc 1.83.0
rust 7.rs 135ms 2.7ms 1.8MB 127ms 0ms rustc 1.83.0
rust 2.rs 264ms 0.6ms 1.9MB 250ms 0ms rustc 1.83.0
python 8-m.py 1991ms 11ms 95.1MB 6310ms 350ms pypy 3.10.14
python 8.py timeout 0.0ms 16.1MB 257ms 50ms cpython 3.13.1
python 8.py timeout 0.0ms 17.2MB 433ms 100ms pyston 3.8.12