equal
deleted
inserted
replaced
42 def compact(self): |
42 def compact(self): |
43 """ |
43 """ |
44 note: only when this function is called, is an O(size) performance hit incurred, |
44 note: only when this function is called, is an O(size) performance hit incurred, |
45 and this cost is amortized over the whole padding space |
45 and this cost is amortized over the whole padding space |
46 """ |
46 """ |
47 print('compacting') |
|
48 self.buffer[:self.count] = self.view |
47 self.buffer[:self.count] = self.view |
49 self.cursor -= self.size |
48 self.cursor -= self.size |
50 |
49 |