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 vstinner
Date 2016-02-03.00:01:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454457710.98.0.180819781748.issue26098@psf.upfronthosting.co.za>
In-reply-to
Content
Patch version 6: I inlined PyFunction_GetSpecializedCode() into fast_function() of Python/ceval.c. It reduces *a little bit* the overhead of the patch when specialization is not used, but it also avoids to expose this function. I don't think that it's worth to expose PyFunction_GetSpecializedCode(): it was only used in ceval.c. For example, I don't use it for unit tests. I prefer to write tests calling the function and checking the results (see test_pep510.py).

*Raw* overhead of specialized-6.patch on calling "def f(): pass": 1.7 nanoseconds. I computed the overhead using timeit:

./python -m timeit -s 'def f(): pass' 'f()'

* Original: 71.7 ns
* specialize-6.patch: 73.4 ns (+1.7 ns, +2.4%)
* specialize-5.patch: 74.3 ns (+2.6 ns, +3.6%)

I will run perf.py to see the overhead on a macro benchmark.
History
Date User Action Args
2016-02-03 00:01:52vstinnersetrecipients: + vstinner
2016-02-03 00:01:50vstinnersetmessageid: <1454457710.98.0.180819781748.issue26098@psf.upfronthosting.co.za>
2016-02-03 00:01:50vstinnerlinkissue26098 messages
2016-02-03 00:01:50vstinnercreate