mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 899858 - Cache pymake len() computation to speed up parsing. r=benjamin
This commit is contained in:
parent
bcb99ed62f
commit
0618865136
@ -573,7 +573,8 @@ class Pattern(object):
|
||||
def __init__(self, s):
|
||||
r = []
|
||||
i = 0
|
||||
while i < len(s):
|
||||
slen = len(s)
|
||||
while i < slen:
|
||||
c = s[i]
|
||||
if c == '\\':
|
||||
nc = s[i + 1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user