Skip to content

Commit 32be3e9

Browse files
committed
Minor performance optimization
1 parent c3a509f commit 32be3e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/transform/BWT.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ bool BWT::inverseMergeTPSI(SliceArray<kanzi::byte>& input, SliceArray<kanzi::byt
191191

192192
const kanzi::byte* src = &input._array[input._index];
193193
kanzi::byte* dst = &output._array[output._index];
194-
memset(&_buffer[0], 0, size_t(_bufferSize) * sizeof(uint));
194+
memset(&_buffer[0], 0, size_t(count) * sizeof(uint));
195195
const uint end1 = uint(pIdx);
196196
const uint end2 = uint(count);
197197

@@ -369,7 +369,7 @@ bool BWT::inverseBiPSIv2(SliceArray<kanzi::byte>& input, SliceArray<kanzi::byte>
369369
}
370370
}
371371

372-
memset(&_buffer[0], 0, size_t(_bufferSize) * sizeof(uint));
372+
memset(&_buffer[0], 0, size_t(count) * sizeof(uint));
373373
int n = 0;
374374

375375
while (n < pIdx) {

0 commit comments

Comments
 (0)