homepage

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 brett.cannon, pitrou, vstinner
Date 2016年01月13日.16:12:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452701554.57.0.0524257395403.issue26058@psf.upfronthosting.co.za>
In-reply-to
Content
guard_benchmark.patch: patch adding a _testcapi.guard_benchmark(), a microbenchmark on dictionary guard. The benchmark measures the cost of checking if a dictionary key was modified.
Run the benchmark with attached guard_benchmark.py. Result on my PC:
* PyObject_GetItem(): 10.2 ns
* PyDict_GetItem(): 9.1 ns
* guard->check(): 2.9 ns
python3 -m platform:
Linux-4.2.8-300.fc23.x86_64-x86_64-with-fedora-23-Twenty_Three
You have to modify manually _testcapi.c to choose between the 3 implementations.
guard_benchmark.patch requires the issue #26098 patch and the fat module which implements fat.GuardDict. The fat module can be found at:
https://github.com/haypo/fat 
History
Date User Action Args
2016年01月13日 16:12:34vstinnersetrecipients: + vstinner, brett.cannon, pitrou
2016年01月13日 16:12:34vstinnersetmessageid: <1452701554.57.0.0524257395403.issue26058@psf.upfronthosting.co.za>
2016年01月13日 16:12:34vstinnerlinkissue26058 messages
2016年01月13日 16:12:34vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /