Rudxain / xorsum

Get XOR checksum with this command-line tool
https://crates.io/crates/xorsum
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Increase processing speed by 5x #18

Closed Rudxain closed 2 years ago

Rudxain commented 2 years ago

Quoting @Measter :

This is done by ensuring that the BufReader's buffer is filled first, then processing the entire buffer in one chunk.

The way it was previously done, each byte was a fallible read, meaning the byte it failed on was observable. Because of that, the compiler was unable to further optimize the processing to make use SIMD instructions.

Reddit comment

I noticed there's a ceiling-div, and tried to search for a built-in function, but it doesn't exist yet

Related issues: #16