Skip to content

Commit 3568ad3

Browse files
committed
[space_map] Optimize zero-filling loops in Aggregator region lookup
1 parent 35ce09e commit 3568ad3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/pdata/space_map/aggregator.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,7 @@ impl Region for U32Region {
289289
match &self.rep {
290290
NoCounts => {
291291
// All zeroes
292-
for i in (b as usize)..e {
293-
results[i - b as usize] = 0;
294-
}
292+
results[0..(e - b as usize)].fill(0);
295293
}
296294
Bits(bits) => {
297295
for i in (b as usize)..e {

0 commit comments

Comments
 (0)