Author ezio.melotti
Recipients barry, ezio.melotti, loewis, nadeem.vawda, orsenthil, r.david.murray, rosslagerwall, serhiy.storchaka
Date 2012-09-19.20:09:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Yes, however it has a startup cost that the function that returns, s) and the one with functool.partial don't have, because with these the compilation happens at the first call.

If we use one of these two, the startup time will be reduced a lot, and the runtime will be ~2x faster.
If we use re.compile(short_regex).search the startup time won't be reduced as much, but the runtime will be ~8x faster.

Given that here we are trying to reduce the startup time and not the runtime, I think using one of those two functions is better.

Another possible solution to improve the startup time is trying to optimize _optimize_unicode -- not sure how much can be done there though.
Date User Action Args
2012-09-19 20:09:50ezio.melottisetrecipients: + ezio.melotti, loewis, barry, orsenthil, nadeem.vawda, r.david.murray, rosslagerwall, serhiy.storchaka
2012-09-19 20:09:50ezio.melottisetmessageid: <>
2012-09-19 20:09:49ezio.melottilinkissue11454 messages
2012-09-19 20:09:49ezio.melotticreate