Browse Source

Store ints in bytearrays for faster copying

Taddeus Kroes 5 năm trước cách đây
mục cha
commit
48a6ae870a
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      strategy.py

+ 2 - 1
strategy.py

@@ -46,7 +46,8 @@ class State:
         colskip = get_colskip(blocks)
         busy = get_busy(blocks, colskip)
         groups, groupsizes, maxgroup = get_groups(blocks)
-        return cls(blocks, exa, held, colskip, busy, (), groups, groupsizes, maxgroup)
+        return cls(bytearray(blocks), exa, held, bytearray(colskip), busy, (),
+                   bytearray(groups), bytearray(groupsizes), maxgroup)
 
     def copy(self, deep):
         mcopy = copy if deep else lambda x: x