New submission from STINNER Victor:
Attached pull request adds a fastpath for wrapper descriptors to use the
FASTCALL calling convention. It's a follow up of bpo-31410 and all my work on
FASTCALL during Python 3.6 and 3.7 development cycles.
Microbenchmark:
./python -m perf timeit -s 'import array; obj=array.array("b");
wrap=array.array.__len__' 'wrap(obj)'
Result:
haypo@selma$ ./python -m perf compare_to ref.json patch.json
Mean +- std dev: [ref] 59.2 ns +- 0.6 ns -> [patch] 28.2 ns +- 0.9 ns: 2.10x
faster (-52%)
It removes 31 nanoseconds on such very fast C function, array_length().
Attached PR is still a work-in-progress. First I would like to know if it's
worth it because working on polishing the actual code.
----------
components: Interpreter Core
messages: 302692
nosy: haypo, inada.naoki, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Optimize wrapper descriptors using FASTCALL
type: performance
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31543>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com