Skip to content

Instantly share code, notes, and snippets.

@sweeneyde
Created October 18, 2021 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sweeneyde/41a76356e875e2a98d16ce5410ab41c0 to your computer and use it in GitHub Desktop.
Save sweeneyde/41a76356e875e2a98d16ce5410ab41c0 to your computer and use it in GitHub Desktop.
Pyperformance results for specialize_inplace_add.md
Benchmark main inplace2
regex_v8 25.4 ms 24.0 ms: 1.06x faster
scimark_sparse_mat_mult 5.92 ms 5.65 ms: 1.05x faster
nbody 128 ms 123 ms: 1.05x faster
spectral_norm 136 ms 131 ms: 1.04x faster
fannkuch 479 ms 464 ms: 1.03x faster
nqueens 99.5 ms 96.5 ms: 1.03x faster
unpack_sequence 46.5 ns 45.1 ns: 1.03x faster
tornado_http 198 ms 192 ms: 1.03x faster
json_dumps 14.1 ms 13.8 ms: 1.02x faster
scimark_sor 179 ms 176 ms: 1.02x faster
regex_dna 209 ms 205 ms: 1.02x faster
pickle_dict 29.4 us 28.9 us: 1.02x faster
2to3 295 ms 291 ms: 1.01x faster
pyflate 606 ms 598 ms: 1.01x faster
float 90.4 ms 89.2 ms: 1.01x faster
scimark_fft 405 ms 402 ms: 1.01x faster
regex_compile 172 ms 171 ms: 1.01x faster
scimark_lu 159 ms 157 ms: 1.01x faster
sympy_sum 203 ms 205 ms: 1.01x slower
mako 13.7 ms 13.9 ms: 1.01x slower
unpickle_pure_python 312 us 317 us: 1.01x slower
logging_silent 132 ns 135 ns: 1.02x slower
sympy_str 378 ms 386 ms: 1.02x slower
xml_etree_parse 163 ms 167 ms: 1.02x slower
xml_etree_iterparse 117 ms 120 ms: 1.03x slower
raytrace 391 ms 403 ms: 1.03x slower
regex_effbot 3.28 ms 3.39 ms: 1.03x slower
xml_etree_process 67.2 ms 69.7 ms: 1.04x slower
python_startup_no_site 6.62 ms 6.88 ms: 1.04x slower
unpickle 17.2 us 18.0 us: 1.05x slower
telco 6.79 ms 7.13 ms: 1.05x slower
python_startup 9.79 ms 10.4 ms: 1.06x slower
Geometric mean (ref) 1.00x faster

Note: I had no CPU isolation for this, so results are imprecise.

bm_fannkuch:
    inplace_add.specialization_success : 23
    inplace_add.specialization_failure : 3
    inplace_add.hit : 7968285
    inplace_add.deferred : 198
    inplace_add.miss : 39
    inplace_add.deopt : 3
    inplace_add.unquickened : 168

bm_nbody:
    inplace_add.specialization_success : 27
    inplace_add.specialization_failure : 3
    inplace_add.hit : 3600615
    inplace_add.deferred : 198
    inplace_add.miss : 39
    inplace_add.deopt : 3
    inplace_add.unquickened : 178

bm_spectral_norm:
    inplace_add.specialization_success : 24
    inplace_add.specialization_failure : 5
    inplace_add.hit : 2684690
    inplace_add.deferred : 326
    inplace_add.miss : 20843
    inplace_add.deopt : 3
    inplace_add.unquickened : 171

bm_telco:
    # Note: telco uses decimal += decimal.
    inplace_add.specialization_success : 21
    inplace_add.specialization_failure : 18537
    inplace_add.hit : 597
    inplace_add.deferred : 1186282
    inplace_add.miss : 39
    inplace_add.deopt : 3
    inplace_add.unquickened : 187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment