Message228573
| Author |
serhiy.storchaka |
| Recipients |
brett.cannon, eric.smith, eric.snow, ncoghlan, pitrou, serhiy.storchaka |
| Date |
2014年10月05日.14:57:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<9949849.oyC1NFgk3B@raxxla> |
| In-reply-to |
<3302796.27zqVUnYJV@raxxla> |
| Content |
Second version of the patch uses fast patch only when builtin __import__ is
not overridden. It is slightly slower (due to lookup of __import__).
>>> import timeit
>>> def f():
... import locale
...
>>> min(timeit.repeat(f, number=100000, repeat=10))
0.10502300000371179
The code is simpler, but still some cumbersome. It would be good to optimize
also "from locale import getlocale". |
|