Author ezio.melotti
Recipients barry, ezio.melotti, loewis, nadeem.vawda, orsenthil, r.david.murray, rosslagerwall, serhiy.storchaka
Date 2012-09-19.19:58:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348084682.42.0.628109551862.issue11454@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2012-09-19 19:58:02ezio.melottisetrecipients: + ezio.melotti, loewis, barry, orsenthil, nadeem.vawda, r.david.murray, rosslagerwall, serhiy.storchaka
2012-09-19 19:58:02ezio.melottisetmessageid: <1348084682.42.0.628109551862.issue11454@psf.upfronthosting.co.za>
2012-09-19 19:58:01ezio.melottilinkissue11454 messages
2012-09-19 19:58:01ezio.melotticreate