Message68536
| 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 :-)). |
|