linelog: extract `len(self._program)` to a local function
This is a micro optimization prepared for following changes where
`len(self._program)` is used in a loop.
Differential Revision: https://phab.mercurial-scm.org/D4149
--- a/mercurial/linelog.py Mon Aug 06 18:56:24 2018 -0700
+++ b/mercurial/linelog.py Tue Aug 07 17:17:01 2018 -0700
@@ -308,7 +308,8 @@
else:
a1info = ar.lines[a1]
a1inst = self._program[a1info._offset]
- oldproglen = len(self._program)
+ programlen = self._program.__len__
+ oldproglen = programlen()
appendinst = self._program.append
# insert