Message201526
I'm surprised, but perhaps performance benefit actually exists (check this on other computers).
### regex_effbot ###
Min: 0.333525 -> 0.325349: 1.03x faster
Avg: 0.342451 -> 0.331665: 1.03x faster
Significant (t=12.13)
Stddev: 0.00606 -> 0.00651: 1.0738x larger
However the main benefit is that non-cached constructor (re.compile is a constructor of regular expression object) is expected to be non-cached, while other module level functions can be cached. See for example struct.Struct. We can cache non-cached constructor explicitly (as in fnmatch), but when a constructor already cached, adding new cache can only add overhead. |
|
Date |
User |
Action |
Args |
2013-10-28 11:50:13 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, pitrou, christian.heimes, ezio.melotti, mrabarnett, flox, neologix |
2013-10-28 11:50:13 | serhiy.storchaka | set | messageid: <1382961013.7.0.168343623052.issue17441@psf.upfronthosting.co.za> |
2013-10-28 11:50:13 | serhiy.storchaka | link | issue17441 messages |
2013-10-28 11:50:13 | serhiy.storchaka | create | |
|