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 pitrou
Recipients Rhamphoryncus, giampaolo.rodola, jcea, pitrou, sserrano
Date 2008-06-21.19:22:13
SpamBayes Score 0.00019369391
Marked as misclassified No
Message-id <1214076128.5874.32.camel@fsol>
In-reply-to <1214066453.72.0.628330871591.issue3001@psf.upfronthosting.co.za>
Content
Le samedi 21 juin 2008 à 16:40 +0000, sebastian serrano a écrit :
> sebastian serrano <sebastian@devsar.com> added the comment:
> 
> Running with python -O the timing gets a little closer between Lock and
> RLock. This code won't be easy to improve in performance. 
> The heaviest call is current_thread(), used at lines:
> 117:    me = current_thread()
> 137:    if self.__owner is not current_thread():

One could always try to rewrite RLock by replacing calls to
threading.current_thread() with thread.get_ident().

However, given the profile table you have appended, it will only save at
most 30% of the time. If someone needs a more important speed-up, he
should reimplement the RLock type in C (and contribute it back :-)).
History
Date User Action Args
2008-06-21 19:22:17pitrousetspambayes_score: 0.000193694 -> 0.00019369391
recipients: + pitrou, jcea, Rhamphoryncus, giampaolo.rodola, sserrano
2008-06-21 19:22:15pitroulinkissue3001 messages
2008-06-21 19:22:14pitroucreate