Mercurial > public > mercurial-scm > hg
comparison mercurial/policy.py @ 33926:f4433f2713d0
encoding: add function to test if a str consists of ASCII characters
Most strings are ASCII. Let's optimize for it.
Using uint64_t is slightly faster than uint32_t on 64bit system, but there
isn't huge difference.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 23 Apr 2017 12:59:42 +0900 |
parents | 2c37f9dabc32 |
children | d13526333835 |
comparison
equal
deleted
inserted
replaced
33925:2c37f9dabc32 | 33926:f4433f2713d0 |
---|---|
73 (r'cext', r'base85'): 1, | 73 (r'cext', r'base85'): 1, |
74 (r'cext', r'bdiff'): 1, | 74 (r'cext', r'bdiff'): 1, |
75 (r'cext', r'diffhelpers'): 1, | 75 (r'cext', r'diffhelpers'): 1, |
76 (r'cext', r'mpatch'): 1, | 76 (r'cext', r'mpatch'): 1, |
77 (r'cext', r'osutil'): 1, | 77 (r'cext', r'osutil'): 1, |
78 (r'cext', r'parsers'): 2, | 78 (r'cext', r'parsers'): 3, |
79 } | 79 } |
80 | 80 |
81 # map import request to other package or module | 81 # map import request to other package or module |
82 _modredirects = { | 82 _modredirects = { |
83 (r'cext', r'charencode'): (r'cext', r'parsers'), | 83 (r'cext', r'charencode'): (r'cext', r'parsers'), |