Skip to content

Instantly share code, notes, and snippets.

@nelhage
Created February 11, 2025 02:55
Show Gist options
  • Save nelhage/bd99284233d3e5a56f177388e078bd9a to your computer and use it in GitHub Desktop.
Save nelhage/bd99284233d3e5a56f177388e078bd9a to your computer and use it in GitHub Desktop.

Benchmarks with tag 'apps':

Benchmark goto tail-call goto-mine
2to3 345 ms 331 ms: 1.04x faster 340 ms: 1.02x faster
docutils 3.27 sec 3.22 sec: 1.02x faster 3.26 sec: 1.00x faster
html5lib 72.6 ms 69.6 ms: 1.04x faster 73.6 ms: 1.01x slower
Geometric mean (ref) 1.03x faster 1.00x faster

Benchmarks with tag 'math':

Benchmark goto tail-call goto-mine
float 85.6 ms 78.4 ms: 1.09x faster 80.9 ms: 1.06x faster
nbody 123 ms 96.0 ms: 1.28x faster 107 ms: 1.15x faster
pidigits 295 ms 295 ms: 1.00x faster 295 ms: 1.00x faster
Geometric mean (ref) 1.12x faster 1.07x faster

Benchmarks with tag 'regex':

Benchmark goto tail-call goto-mine
regex_compile 169 ms 153 ms: 1.11x faster 166 ms: 1.02x faster
regex_dna 242 ms 242 ms: 1.00x faster 246 ms: 1.02x slower
regex_effbot 3.87 ms 3.79 ms: 1.02x faster 3.73 ms: 1.04x faster
regex_v8 32.0 ms 31.3 ms: 1.02x faster not significant
Geometric mean (ref) 1.04x faster 1.01x faster

Benchmarks with tag 'serialize':

Benchmark goto tail-call goto-mine
json_dumps 16.4 ms 16.0 ms: 1.02x faster 16.2 ms: 1.01x faster
json_loads 38.9 us not significant 39.1 us: 1.01x slower
pickle 16.9 us 16.9 us: 1.00x faster not significant
pickle_dict 41.7 us not significant 41.8 us: 1.00x slower
pickle_pure_python 437 us 391 us: 1.12x faster 419 us: 1.04x faster
tomli_loads 2.81 sec 2.45 sec: 1.15x faster 2.61 sec: 1.08x faster
unpickle 19.1 us 18.9 us: 1.01x faster 18.9 us: 1.01x faster
unpickle_list 5.60 us 5.63 us: 1.01x slower 5.58 us: 1.00x faster
unpickle_pure_python 308 us 254 us: 1.21x faster 286 us: 1.08x faster
xml_etree_parse 188 ms 185 ms: 1.01x faster 187 ms: 1.00x faster
xml_etree_iterparse 130 ms 122 ms: 1.07x faster 128 ms: 1.02x faster
xml_etree_generate 121 ms 113 ms: 1.07x faster 117 ms: 1.03x faster
xml_etree_process 85.4 ms 76.0 ms: 1.12x faster 80.6 ms: 1.06x faster
Geometric mean (ref) 1.05x faster 1.02x faster

Benchmark hidden because not significant (1): pickle_list

Benchmarks with tag 'startup':

Benchmark goto tail-call goto-mine
python_startup_no_site 13.2 ms not significant 13.4 ms: 1.01x slower
Geometric mean (ref) 1.00x slower 1.01x slower

Benchmark hidden because not significant (1): python_startup

Benchmarks with tag 'template':

Benchmark goto tail-call goto-mine
django_template 49.2 ms 46.8 ms: 1.05x faster 48.8 ms: 1.01x faster
genshi_text 31.0 ms 27.7 ms: 1.12x faster 29.3 ms: 1.06x faster
genshi_xml 64.9 ms 59.7 ms: 1.09x faster 61.3 ms: 1.06x faster
mako 15.7 ms 13.2 ms: 1.18x faster 14.5 ms: 1.08x faster
Geometric mean (ref) 1.11x faster 1.05x faster

All benchmarks:

Benchmark goto tail-call goto-mine
2to3 345 ms 331 ms: 1.04x faster 340 ms: 1.02x faster
async_generators 530 ms 521 ms: 1.02x faster 519 ms: 1.02x faster
asyncio_tcp 430 ms 426 ms: 1.01x faster not significant
asyncio_tcp_ssl 1.62 sec 1.61 sec: 1.01x faster 1.63 sec: 1.01x slower
chaos 80.1 ms 73.4 ms: 1.09x faster 76.9 ms: 1.04x faster
comprehensions 23.6 us 20.6 us: 1.15x faster 22.1 us: 1.07x faster
bench_thread_pool 1.50 ms 1.44 ms: 1.04x faster 1.49 ms: 1.01x faster
coroutines 26.6 ms 24.8 ms: 1.07x faster 25.0 ms: 1.06x faster
coverage 614 ms 583 ms: 1.05x faster 602 ms: 1.02x faster
crypto_pyaes 96.2 ms 88.3 ms: 1.09x faster 95.0 ms: 1.01x faster
deepcopy 366 us 331 us: 1.11x faster 349 us: 1.05x faster
deepcopy_reduce 3.96 us 3.64 us: 1.09x faster 3.82 us: 1.04x faster
deepcopy_memo 40.2 us 32.8 us: 1.23x faster 36.9 us: 1.09x faster
deltablue 3.98 ms 3.49 ms: 1.14x faster 3.72 ms: 1.07x faster
django_template 49.2 ms 46.8 ms: 1.05x faster 48.8 ms: 1.01x faster
docutils 3.27 sec 3.22 sec: 1.02x faster 3.26 sec: 1.00x faster
fannkuch 572 ms 499 ms: 1.15x faster 535 ms: 1.07x faster
float 85.6 ms 78.4 ms: 1.09x faster 80.9 ms: 1.06x faster
create_gc_cycles 2.00 ms not significant 1.98 ms: 1.01x faster
gc_traversal 4.59 ms not significant 4.29 ms: 1.07x faster
generators 33.9 ms 31.1 ms: 1.09x faster 31.9 ms: 1.06x faster
genshi_text 31.0 ms 27.7 ms: 1.12x faster 29.3 ms: 1.06x faster
genshi_xml 64.9 ms 59.7 ms: 1.09x faster 61.3 ms: 1.06x faster
go 150 ms 134 ms: 1.12x faster 146 ms: 1.03x faster
hexiom 8.17 ms 6.81 ms: 1.20x faster 7.67 ms: 1.07x faster
html5lib 72.6 ms 69.6 ms: 1.04x faster 73.6 ms: 1.01x slower
json_dumps 16.4 ms 16.0 ms: 1.02x faster 16.2 ms: 1.01x faster
json_loads 38.9 us not significant 39.1 us: 1.01x slower
logging_format 8.26 us 7.76 us: 1.06x faster 8.13 us: 1.02x faster
logging_silent 135 ns 110 ns: 1.22x faster 129 ns: 1.04x faster
logging_simple 7.43 us 7.00 us: 1.06x faster 7.32 us: 1.01x faster
mako 15.7 ms 13.2 ms: 1.18x faster 14.5 ms: 1.08x faster
mdp 3.38 sec 3.33 sec: 1.02x faster 3.35 sec: 1.01x faster
meteor_contest 145 ms 138 ms: 1.05x faster 143 ms: 1.01x faster
nbody 123 ms 96.0 ms: 1.28x faster 107 ms: 1.15x faster
nqueens 127 ms 114 ms: 1.11x faster 125 ms: 1.02x faster
pathlib 17.8 ms 17.3 ms: 1.03x faster not significant
pickle 16.9 us 16.9 us: 1.00x faster not significant
pickle_dict 41.7 us not significant 41.8 us: 1.00x slower
pickle_pure_python 437 us 391 us: 1.12x faster 419 us: 1.04x faster
pidigits 295 ms 295 ms: 1.00x faster 295 ms: 1.00x faster
pprint_safe_repr 1.07 sec 956 ms: 1.12x faster 1.04 sec: 1.02x faster
pprint_pformat 2.17 sec 1.96 sec: 1.11x faster 2.12 sec: 1.02x faster
pyflate 548 ms 488 ms: 1.12x faster 531 ms: 1.03x faster
python_startup_no_site 13.2 ms not significant 13.4 ms: 1.01x slower
raytrace 348 ms 326 ms: 1.07x faster 341 ms: 1.02x faster
regex_compile 169 ms 153 ms: 1.11x faster 166 ms: 1.02x faster
regex_dna 242 ms 242 ms: 1.00x faster 246 ms: 1.02x slower
regex_effbot 3.87 ms 3.79 ms: 1.02x faster 3.73 ms: 1.04x faster
regex_v8 32.0 ms 31.3 ms: 1.02x faster not significant
richards 60.6 ms 54.8 ms: 1.11x faster 57.2 ms: 1.06x faster
richards_super 68.8 ms 62.5 ms: 1.10x faster 66.1 ms: 1.04x faster
scimark_fft 432 ms 382 ms: 1.13x faster 399 ms: 1.08x faster
scimark_lu 161 ms 132 ms: 1.22x faster 145 ms: 1.11x faster
scimark_monte_carlo 88.5 ms 75.8 ms: 1.17x faster 84.9 ms: 1.04x faster
scimark_sor 155 ms 131 ms: 1.18x faster 146 ms: 1.07x faster
scimark_sparse_mat_mult 6.47 ms 5.68 ms: 1.14x faster 5.95 ms: 1.09x faster
spectral_norm 129 ms 113 ms: 1.13x faster 121 ms: 1.07x faster
sqlglot_normalize 150 ms 144 ms: 1.05x faster 148 ms: 1.02x faster
sqlglot_optimize 75.1 ms 71.0 ms: 1.06x faster 73.1 ms: 1.03x faster
sqlglot_parse 1.65 ms 1.51 ms: 1.09x faster 1.59 ms: 1.04x faster
sqlglot_transpile 2.09 ms 1.93 ms: 1.08x faster 2.01 ms: 1.04x faster
sqlite_synth 3.28 us 3.22 us: 1.02x faster 3.24 us: 1.01x faster
sympy_expand 614 ms 596 ms: 1.03x faster 612 ms: 1.00x faster
sympy_integrate 27.0 ms 26.1 ms: 1.04x faster 26.9 ms: 1.01x faster
sympy_sum 180 ms 175 ms: 1.03x faster 182 ms: 1.01x slower
sympy_str 357 ms 345 ms: 1.04x faster 358 ms: 1.00x slower
telco 10.5 ms 10.0 ms: 1.05x faster 10.2 ms: 1.03x faster
tomli_loads 2.81 sec 2.45 sec: 1.15x faster 2.61 sec: 1.08x faster
typing_runtime_protocols 232 us 219 us: 1.06x faster 223 us: 1.04x faster
unpack_sequence 57.9 ns 43.9 ns: 1.32x faster 46.1 ns: 1.26x faster
unpickle 19.1 us 18.9 us: 1.01x faster 18.9 us: 1.01x faster
unpickle_list 5.60 us 5.63 us: 1.01x slower 5.58 us: 1.00x faster
unpickle_pure_python 308 us 254 us: 1.21x faster 286 us: 1.08x faster
xml_etree_parse 188 ms 185 ms: 1.01x faster 187 ms: 1.00x faster
xml_etree_iterparse 130 ms 122 ms: 1.07x faster 128 ms: 1.02x faster
xml_etree_generate 121 ms 113 ms: 1.07x faster 117 ms: 1.03x faster
xml_etree_process 85.4 ms 76.0 ms: 1.12x faster 80.6 ms: 1.06x faster
Geometric mean (ref) 1.08x faster 1.03x faster

Benchmark hidden because not significant (4): asyncio_websockets, bench_mp_pool, pickle_list, python_startup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment