| ... | @@ -71,10 +71,7 @@ pub fn Crc32WithPoly(comptime poly: Polynomial) type { | ... | @@ -71,10 +71,7 @@ pub fn Crc32WithPoly(comptime poly: Polynomial) type { |
| 71 | const p = input[i .. i + 8]; | 71 | const p = input[i .. i + 8]; |
| 72 | | 72 | |
| 73 | // Unrolling this way gives ~50Mb/s increase | 73 | // Unrolling this way gives ~50Mb/s increase |
| 74 | self.crc ^= (@as(u32, p[0]) << 0); | 74 | self.crc ^= std.mem.readIntLittle(u32, p[0..4]); |
| 75 | self.crc ^= (@as(u32, p[1]) << 8); | | |
| 76 | self.crc ^= (@as(u32, p[2]) << 16); | | |
| 77 | self.crc ^= (@as(u32, p[3]) << 24); | | |
| 78 | | 75 | |
| 79 | self.crc = | 76 | self.crc = |
| 80 | lookup_tables[0][p[7]] ^ | 77 | lookup_tables[0][p[7]] ^ |