Message170761
Attached new benchmark file.
Results:
Testing runtime of the _has_surrogates functions
Generating chars...
Generating samples...
1.61 <- re.compile(current_regex).search
0.24 <- re.compile(short_regex).search
15.13 <- return any(c in surrogates for c in s)
10.21 <- for c in s: if c in surrogates: return True
0.85 <- return re.search(short_regex, s)
0.83 <- functools.partial(re.search, short_regex)
20.86 <- for c in map(ord, s): if c in range(0xDC80, 0xDCFF+1): return True
19.68 <- for c in map(ord, s): if 0xDC80 <= c <= 0xDCFF: return True
0.28 <- re.compile('[^\udc80-\udcff]*\Z').match
7.00 <- return not set(map(chr, range(0xDC80, 0xDCFF+1))).isdisjoint(s)
Testing startup time
0.57 <- r = re.compile('[\udc80-\udcff]').search
0.59 <- r = re.compile('[^\udc80-\udcff]*\Z').match
199.79 <- r = re.compile('[\udc80-\udcff]').search; purge()
22.62 <- r = re.compile('[^\udc80-\udcff]*\Z').match; purge()
1.12 <- r = pickle.loads(p) |
|
Date |
User |
Action |
Args |
2012-09-19 19:58:02 | ezio.melotti | set | recipients:
+ ezio.melotti, loewis, barry, orsenthil, nadeem.vawda, r.david.murray, rosslagerwall, serhiy.storchaka |
2012-09-19 19:58:02 | ezio.melotti | set | messageid: <1348084682.42.0.628109551862.issue11454@psf.upfronthosting.co.za> |
2012-09-19 19:58:01 | ezio.melotti | link | issue11454 messages |
2012-09-19 19:58:01 | ezio.melotti | create | |
|