This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, serhiy.storchaka, vstinner
Date 2017-09-21.13:25:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506000331.12.0.134767574734.issue31543@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-09-21 13:25:31vstinnersetrecipients: + vstinner, methane, serhiy.storchaka
2017-09-21 13:25:31vstinnersetmessageid: <1506000331.12.0.134767574734.issue31543@psf.upfronthosting.co.za>
2017-09-21 13:25:31vstinnerlinkissue31543 messages
2017-09-21 13:25:30vstinnercreate