Solve perf problem on CmpLog map reset

This commit is contained in:
Andrea Fioraldi 2021-06-16 18:59:15 +02:00
parent dea21da5c3
commit d976b02609

View File

@ -115,12 +115,8 @@ impl CmpMap for CmpLogMap {
}
fn reset(&mut self) -> Result<(), Error> {
self.headers = [CmpLogHeader {
hits: 0,
shape: 0,
kind: 0,
}; CMPLOG_MAP_W];
self.operands = [[CmpLogOperands(0, 0); CMPLOG_MAP_H]; CMPLOG_MAP_W];
self.headers = unsafe { core::mem::zeroed() };
// self.operands = unsafe { core::mem::zeroed() };
Ok(())
}
}