V VS Python benchmarks

Current benchmark data was generated on Mon Jun 23 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 864ms 25ms 28.9MB 853ms 0ms v/clang+gc 0.4.11
python 1.py 1191ms 15ms 96.3MB 1123ms 53ms pypy 3.10.16
v 1.v 2188ms 3.5ms 2086.6MB 1307ms 867ms v/clang 0.4.11
python 1.py timeout 0.0ms 41.0MB 4973ms 17ms cpython 3.13.5
python 1.py timeout 0.0ms 40.5MB 4750ms 230ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 71ms 0.8ms 4.6MB 60ms 0ms v/clang+gc 0.4.11
python 1.py 101ms 1.2ms 68.6MB 67ms 20ms pypy 3.10.16
v 1.v 205ms 4.7ms 198.0MB 110ms 83ms v/clang 0.4.11
python 1.py 476ms 3.1ms 11.9MB 453ms 10ms pyston 3.8.12
python 1.py 734ms 12ms 13.0MB 723ms 0ms cpython 3.13.5

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1226ms 4.7ms 105.6MB 1180ms 37ms pypy 3.10.16
python 1.py 2700ms 31ms 25.4MB 2673ms 10ms cpython 3.13.5
python 1.py timeout 0.0ms 17.4MB 4980ms 3ms pyston 3.8.12
v 1.v timeout 0.0ms 17.5MB 8343ms 10803ms v/clang 0.4.11
v 1.v timeout 0.0ms 17.6MB 8653ms 10620ms v/clang+gc 0.4.11

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 226ms 2.3ms 84.8MB 190ms 23ms pypy 3.10.16
python 1.py 234ms 4.1ms 20.6MB 213ms 7ms cpython 3.13.5
python 1.py 649ms 4.8ms 16.8MB 630ms 3ms pyston 3.8.12
v 1-m.v 1345ms 36ms 9.8MB 2223ms 2887ms v/clang 0.4.11
v 1-m.v 1657ms 68ms 10.4MB 2843ms 3423ms v/clang+gc 0.4.11

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 254ms 3.5ms 83.4MB 217ms 20ms pypy 3.10.16
python 1.py 362ms 1.9ms 12.6MB 343ms 3ms cpython 3.13.5
python 1.py 2004ms 4.0ms 9.6MB 1990ms 0ms pyston 3.8.12
v 1.v timeout 0.0ms 8.1MB 4990ms 0ms v/clang+gc 0.4.11

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 102ms 1.5ms 63.6MB 77ms 10ms pypy 3.10.16
python 1.py 112ms 2.1ms 12.3MB 100ms 0ms cpython 3.13.5
python 1.py 352ms 1.3ms 8.8MB 340ms 0ms pyston 3.8.12
v 1.v timeout 0.0ms 4.5MB 4990ms 0ms v/clang+gc 0.4.11

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 2201ms 5.0ms 1.9MB 2193ms 0ms v/clang+gc 0.4.11
v 1.v 2314ms 97ms 1.1MB 2307ms 0ms v/clang 0.4.11

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 188ms 2.1ms 1.9MB 180ms 0ms v/clang+gc 0.4.11
v 1.v 193ms 1.7ms 1.1MB 183ms 0ms v/clang 0.4.11

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 505ms 3.4ms 1.3MB 497ms 0ms v/clang 0.4.11
v 1.v 528ms 4.5ms 2.1MB 513ms 0ms v/clang+gc 0.4.11
python 1.py 1867ms 5.3ms 88.9MB 1820ms 33ms pypy 3.10.16
python 5-m.py 2287ms 10ms 65.6MB 3470ms 880ms pypy 3.10.16
python 5-m.py 2582ms 230ms 12.5MB 3513ms 1153ms pyston 3.8.12
python 1.py 3033ms 32ms 8.1MB 3020ms 0ms pyston 3.8.12
python 5-m.py 3368ms 22ms 13.9MB 4457ms 910ms cpython 3.13.5
python 1.py 4740ms 91ms 9.0MB 4727ms 0ms cpython 3.13.5

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 53ms 0.7ms 1.3MB 47ms 0ms v/clang 0.4.11
v 1.v 56ms 2.1ms 2.1MB 50ms 0ms v/clang+gc 0.4.11
python 1.py 255ms 1.5ms 63.4MB 223ms 17ms pypy 3.10.16
python 5-m.py 310ms 1.8ms 12.5MB 400ms 140ms pyston 3.8.12
python 1.py 314ms 0.6ms 8.1MB 300ms 0ms pyston 3.8.12
python 5-m.py 402ms 9.2ms 13.9MB 490ms 130ms cpython 3.13.5
python 5-m.py 450ms 6.4ms 65.6MB 747ms 310ms pypy 3.10.16
python 1.py 494ms 21ms 8.9MB 483ms 0ms cpython 3.13.5

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 1.0ms 0.0ms 1.4MB 0ms 0ms v/clang 0.4.11
v 1.v 1.3ms 0.1ms 1.9MB 0ms 0ms v/clang+gc 0.4.11
python 1.py 11ms 0.5ms 7.6MB 0ms 0ms pyston 3.8.12
python 1.py 14ms 1.1ms 8.9MB 0ms 0ms cpython 3.13.5
python 1.py 29ms 1.3ms 51.7MB 10ms 10ms pypy 3.10.16

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 2.py 148ms 3.7ms 58.4MB 123ms 10ms pypy 3.10.16
python 1.py 182ms 4.5ms 59.4MB 160ms 10ms pypy 3.10.16
v 1.v 262ms 4.6ms 2.1MB 253ms 0ms v/clang+gc 0.4.11
v 1.v 266ms 2.4ms 1.3MB 260ms 0ms v/clang 0.4.11
python 1.py 742ms 13ms 8.9MB 730ms 0ms pyston 3.8.12
python 2.py 861ms 17ms 8.5MB 850ms 0ms pyston 3.8.12
python 1.py 1135ms 8.0ms 9.5MB 1120ms 0ms cpython 3.13.5
python 2.py 1359ms 9.5ms 9.4MB 1347ms 0ms cpython 3.13.5

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 2.py 340ms 3.5ms 59.4MB 317ms 10ms pypy 3.10.16
python 1.py 378ms 4.8ms 60.3MB 353ms 13ms pypy 3.10.16
v 1.v 771ms 2.0ms 2.1MB 760ms 0ms v/clang+gc 0.4.11
v 1.v 789ms 22ms 1.3MB 780ms 0ms v/clang 0.4.11
python 1.py 2158ms 21ms 8.9MB 2147ms 0ms pyston 3.8.12
python 2.py 2527ms 78ms 8.5MB 2513ms 0ms pyston 3.8.12
python 1.py 3383ms 12ms 9.5MB 3370ms 0ms cpython 3.13.5
python 2.py 3989ms 100ms 9.3MB 3973ms 0ms cpython 3.13.5

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 91ms 1.3ms 1.3MB 83ms 0ms v/clang 0.4.11
v 1.v 103ms 2.6ms 2.1MB 97ms 0ms v/clang+gc 0.4.11
python 2.py 107ms 0.7ms 58.2MB 80ms 13ms pypy 3.10.16
python 1.py 121ms 2.3ms 58.8MB 100ms 10ms pypy 3.10.16
python 1.py 356ms 7.7ms 8.5MB 343ms 0ms pyston 3.8.12
python 2.py 388ms 3.7ms 8.1MB 377ms 0ms pyston 3.8.12
python 1.py 542ms 5.2ms 9.4MB 530ms 0ms cpython 3.13.5
python 2.py 648ms 0.8ms 8.9MB 637ms 0ms cpython 3.13.5

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 312ms 1.0ms 2.3MB 300ms 0ms v/clang+gc 0.4.11
v 1.v 312ms 2.1ms 1.6MB 300ms 0ms v/clang 0.4.11
python 2.py 1361ms 5.0ms 57.9MB 1333ms 10ms pypy 3.10.16
python 1.py 2654ms 8.4ms 58.4MB 2627ms 10ms pypy 3.10.16
python 1.py timeout 0.0ms 9.0MB 4990ms 0ms cpython 3.13.5
python 2.py timeout 0.0ms 9.0MB 4990ms 0ms cpython 3.13.5
python 1.py timeout 0.0ms 8.3MB 4990ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 8.1MB 4990ms 0ms pyston 3.8.12

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 33ms 0.1ms 2.3MB 20ms 0ms v/clang+gc 0.4.11
v 1.v 34ms 1.0ms 1.6MB 27ms 0ms v/clang 0.4.11
python 2.py 180ms 2.2ms 58.2MB 157ms 10ms pypy 3.10.16
python 1.py 306ms 6.8ms 57.2MB 283ms 10ms pypy 3.10.16
python 1.py 943ms 6.5ms 8.3MB 933ms 0ms pyston 3.8.12
python 2.py 1324ms 11ms 8.1MB 1313ms 0ms pyston 3.8.12
python 1.py 2929ms 30ms 9.0MB 2917ms 0ms cpython 3.13.5
python 2.py 2959ms 13ms 9.0MB 2947ms 0ms cpython 3.13.5

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 329ms 14ms 40.3MB 313ms 0ms v/clang 0.4.11
v 2.v 330ms 2.6ms 6.1MB 320ms 0ms v/clang 0.4.11
v 2.v 330ms 5.1ms 6.9MB 320ms 0ms v/clang+gc 0.4.11
v 1.v 447ms 7.3ms 60.6MB 430ms 0ms v/clang+gc 0.4.11
python 1.py 2598ms 50ms 369.6MB 2527ms 57ms pypy 3.10.16
python 2.py 3047ms 54ms 632.9MB 2860ms 173ms pyston 3.8.12
python 1.py 4792ms 40ms 320.4MB 4733ms 43ms pyston 3.8.12
python 1.py timeout 0.0ms 321.4MB 4960ms 20ms cpython 3.13.5
python 2.py timeout 0.0ms 633.8MB 4817ms 173ms cpython 3.13.5
python 2.py timeout 0.0ms 960.0MB 4707ms 283ms pypy 3.10.16

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 61ms 2.0ms 11.1MB 50ms 0ms v/clang 0.4.11
v 1.v 62ms 2.1ms 11.9MB 50ms 0ms v/clang+gc 0.4.11
v 2.v 82ms 2.0ms 2.4MB 73ms 0ms v/clang 0.4.11
v 2.v 83ms 1.6ms 3.1MB 70ms 0ms v/clang+gc 0.4.11
python 1.py 555ms 7.1ms 135.3MB 520ms 20ms pypy 3.10.16
python 2.py 736ms 10.0ms 164.3MB 693ms 30ms pyston 3.8.12
python 1.py 1099ms 37ms 86.0MB 1077ms 10ms pyston 3.8.12
python 2.py 1419ms 19ms 165.1MB 1373ms 33ms cpython 3.13.5
python 2.py 1579ms 52ms 290.2MB 1487ms 77ms pypy 3.10.16
python 1.py 2896ms 26ms 87.0MB 2870ms 10ms cpython 3.13.5

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 4.py 1919ms 1.6ms 8.9MB 1877ms 27ms pyston 3.8.12
python 4.py 1963ms 11ms 9.5MB 1907ms 40ms cpython 3.13.5
python 4.py 2195ms 8.6ms 89.5MB 2153ms 27ms pypy 3.10.16
v 2.v 3216ms 15ms 3.5MB 3197ms 7ms v/clang+gc 0.4.11

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 4.py 451ms 1.8ms 8.6MB 440ms 0ms pyston 3.8.12
python 4.py 466ms 1.8ms 9.4MB 453ms 0ms cpython 3.13.5
python 4.py 552ms 2.6ms 83.9MB 513ms 27ms pypy 3.10.16
v 2.v 801ms 11ms 3.1MB 790ms 0ms v/clang+gc 0.4.11

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 2259ms 23ms 243.6MB 2197ms 50ms pypy 3.10.16
python 1.py 4762ms 13ms 226.3MB 4560ms 190ms pyston 3.8.12
python 1.py timeout 0.0ms 137.2MB 4933ms 50ms cpython 3.13.5
v 1.v timeout 0.0ms 83.1MB 4980ms 10ms v/clang+gc 0.4.11

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 337ms 3.6ms 86.0MB 297ms 27ms pypy 3.10.16
python 1.py 502ms 4.6ms 30.5MB 467ms 20ms pyston 3.8.12
python 1.py 619ms 1.3ms 30.1MB 587ms 20ms cpython 3.13.5
v 1.v 3540ms 93ms 26.0MB 3523ms 3ms v/clang+gc 0.4.11

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 8.py timeout 0.0ms 14.8MB 40ms 10ms cpython 3.13.5
python 8.py timeout 0.0ms 95.4MB 777ms 80ms pypy 3.10.16
python 8.py timeout 0.0ms 14.2MB 37ms 10ms pyston 3.8.12
v 1.v timeout 0.0ms 1.6MB 4990ms 0ms v/clang 0.4.11
v 1.v timeout 0.0ms 2.8MB 4990ms 0ms v/clang+gc 0.4.11

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 1286ms 8.5ms 1.5MB 1277ms 0ms v/clang 0.4.11
v 1.v 1326ms 6.9ms 2.5MB 1313ms 0ms v/clang+gc 0.4.11
python 8.py timeout 0.0ms 14.5MB 47ms 10ms cpython 3.13.5
python 8.py timeout 0.0ms 95.8MB 1297ms 173ms pypy 3.10.16
python 8.py timeout 0.0ms 13.7MB 60ms 20ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 326ms 0.7ms 1.9MB 320ms 0ms v/clang 0.4.11
v 1.v 334ms 0.7ms 2.5MB 320ms 0ms v/clang+gc 0.4.11
python 8-m.py 1962ms 22ms 93.3MB 6350ms 247ms pypy 3.10.16
python 8.py timeout 0.0ms 14.0MB 83ms 20ms cpython 3.13.5
python 8.py timeout 0.0ms 13.1MB 137ms 33ms pyston 3.8.12