STINNER Victor added the comment: Here are benchmark results. Sorry, but I'm not really convinced that this specialization is worth it.
The change adds yet another calling convention where we already have METH_NOARG, METH_VARARGS, METH_O, METH_NOARG | METH_KEYWORDS, METH_FASTCALL... I'm ok to add a new calling convention but only if it's faster on more benchmarks or if it uses much less memory. It doesn't seem to be the case with the current change. Differences of at least 5%: haypo@speed-python$ python3 -m perf compare_to /home/haypo/json/2017-06-09_08-18-master-ef8320cf6f09.json.gz ~/json/patch/2017-06-09_08-18-master-ef8320cf6f09-patch-1955.json.gz -G --min-speed=5 --table +-------------------------+--------------------------------------+-------------------------------------------------+ | Benchmark | 2017-06-09_08-18-master-ef8320cf6f09 | 2017-06-09_08-18-master-ef8320cf6f09-patch-1955 | +=========================+======================================+=================================================+ | spectral_norm | 283 ms | 263 ms: 1.08x faster (-7%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | scimark_lu | 294 ms | 314 ms: 1.07x slower (+7%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | scimark_sparse_mat_mult | 8.15 ms | 9.12 ms: 1.12x slower (+12%) | +-------------------------+--------------------------------------+-------------------------------------------------+ Differences of at least 2%: haypo@speed-python$ python3 -m perf compare_to /home/haypo/json/2017-06-09_08-18-master-ef8320cf6f09.json.gz ~/json/patch/2017-06-09_08-18-master-ef8320cf6f09-patch-1955.json.gz -G --min-speed=2 --table +-------------------------+--------------------------------------+-------------------------------------------------+ | Benchmark | 2017-06-09_08-18-master-ef8320cf6f09 | 2017-06-09_08-18-master-ef8320cf6f09-patch-1955 | +=========================+======================================+=================================================+ | spectral_norm | 283 ms | 263 ms: 1.08x faster (-7%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | genshi_text | 73.1 ms | 70.5 ms: 1.04x faster (-3%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | scimark_monte_carlo | 209 ms | 201 ms: 1.04x faster (-3%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | raytrace | 1.05 sec | 1.02 sec: 1.02x faster (-2%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | regex_v8 | 40.3 ms | 41.4 ms: 1.03x slower (+3%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | json_dumps | 26.2 ms | 27.0 ms: 1.03x slower (+3%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | float | 207 ms | 215 ms: 1.04x slower (+4%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | crypto_pyaes | 199 ms | 207 ms: 1.04x slower (+4%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | scimark_fft | 644 ms | 675 ms: 1.05x slower (+5%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | scimark_lu | 294 ms | 314 ms: 1.07x slower (+7%) | +-------------------------+--------------------------------------+-------------------------------------------------+ | scimark_sparse_mat_mult | 8.15 ms | 9.12 ms: 1.12x slower (+12%) | +-------------------------+--------------------------------------+-------------------------------------------------+ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29464> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com