summaryrefslogtreecommitdiffstats
path: root/Lib/pty.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-17 20:18:49 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-17 20:18:49 (GMT)
commit0e5ab17ad34c8810f0626409fd3d1c8dc85e68ac (patch)
treea95286375214c45e7b752a7d4fbfba902a79167f /Lib/pty.py
parentc364cf82283332522ebc139e2edb5c8247f61307 (diff)
downloadcpython-0e5ab17ad34c8810f0626409fd3d1c8dc85e68ac.zip
cpython-0e5ab17ad34c8810f0626409fd3d1c8dc85e68ac.tar.gz
cpython-0e5ab17ad34c8810f0626409fd3d1c8dc85e68ac.tar.bz2
Get a 3- to 4-fold speedup for sub()/subn(), split() and findall() by
not calling self.search(); instead, call self.code.match() directly and interpret the list of registers it returns directly. This saves the overhead of instantiating a MatchObject for each hit, basically inlining search() as well as group(). When a MatchObject is still needed, one is allocated and reused for the duration of the scan.
Diffstat (limited to 'Lib/pty.py')
0 files changed, 0 insertions, 0 deletions