Message228573
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". |
|
Date |
User |
Action |
Args |
2014-10-05 14:57:17 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, pitrou, eric.smith, eric.snow |
2014-10-05 14:57:17 | serhiy.storchaka | link | issue22557 messages |
2014-10-05 14:57:17 | serhiy.storchaka | create | |
|