[TupleVariation] Minor optimization in compileDeltaValues_()

This commit is contained in:
Behdad Esfahbod 2021-04-08 13:00:11 -06:00
parent ea505154df
commit c88aab1544

View File

@ -342,7 +342,8 @@ class TupleVariation(object):
if bytearr is None:
bytearr = bytearray()
pos = 0
while pos < len(deltas):
numDeltas = len(deltas)
while pos < numDeltas:
value = deltas[pos]
if value == 0:
pos = TupleVariation.encodeDeltaRunAsZeroes_(deltas, pos, bytearr)