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 skrah
Recipients christian.heimes, skrah, vstinner
Date 2013-10-12.13:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381583626.77.0.649345860883.issue19229@psf.upfronthosting.co.za>
In-reply-to
Content
Using the microbenchmark I get (standard version):

./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]"
1000 loops, best of 3: 460 usec per loop


Victor's version:

./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]"
1000 loops, best of 3: 355 usec per loop


Importing _operator directly:

./python -m timeit "import sys; modname='_operator'" "__import__(modname); del sys.modules[modname]"
10000 loops, best of 3: 35.7 usec per loop


Extrapolating from what I did with decimal, I guess a _pyoperator
version could get down to something like 70 usec.
History
Date User Action Args
2013-10-12 13:13:46skrahsetrecipients: + skrah, vstinner, christian.heimes
2013-10-12 13:13:46skrahsetmessageid: <1381583626.77.0.649345860883.issue19229@psf.upfronthosting.co.za>
2013-10-12 13:13:46skrahlinkissue19229 messages
2013-10-12 13:13:46skrahcreate