global: perf + resource imprv

This commit is contained in:
nym21
2025-07-12 15:07:02 +02:00
parent 0167a2ae59
commit b24a29895f
18 changed files with 274 additions and 417 deletions
+3 -3
View File
@@ -17,14 +17,14 @@ impl XORIndex {
bytes
}
#[inline(always)]
#[inline]
pub fn byte(&mut self, mut byte: u8, xor_bytes: &XORBytes) -> u8 {
byte ^= xor_bytes[self.0];
self.increment();
byte
}
#[inline(always)]
#[inline]
pub fn increment(&mut self) {
self.0 += 1;
if self.0 == XOR_LEN {
@@ -32,7 +32,7 @@ impl XORIndex {
}
}
#[inline(always)]
#[inline]
pub fn add_assign(&mut self, i: usize) {
self.0 = (self.0 + i) % XOR_LEN;
}