4 ms·
Relatively obscure fun thing: CRC32 checksum instructions. https://github.com/srijs/rust-crc32fast/pull/6 https://github.com/srijs/rust-crc32fast/pull/6 (Get
by floatboth 5y ago
Relatively obscure fun thing: CRC32 checksum instructions.
https://github.com/srijs/rust-crc32fast/pull/6 https://github.com/srijs/rust-crc32fast/pull/6
(Get rust nightly via https://rustup.rs https://rustup.rs, pull the repo, run: cargo bench --features nightly)
- weatherlight 5y ago(16-inch, 2019) - 2.6 GHz 6-Core Intel Core i7 - 16 GB 2667 MHz DDR4 test result: ok. 0 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests (target/release/deps/bench-b9bcbb53a5ef2c28) running 4 tests test bench_kilobyte_baseline ... bench: 310 ns/iter (+/- 70) = 3303 MB/s test bench_kilobyte_specialized ... bench: 48 ns/iter (+/- 5) = 21333 MB/s test bench_megabyte_baseline ... bench: 298,273 ns/iter (+/- 42,157) = 3515 MB/s test bench_megabyte_specialized ... bench: 45,100 ns/iter (+/- 7,249) = 23250 MB/s test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured ----------------------------------------------------------- (14-inch, 2021) - Apple M1 Max - 64gb test result: ok. 0 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests (target/release/deps/bench-3eea1c397faf4328) running 4 tests test bench_kilobyte_baseline ... bench: 223 ns/iter (+/- 8) = 4591 MB/s test bench_kilobyte_specialized ... bench: 100 ns/iter (+/- 0) = 10240 MB/s test bench_megabyte_baseline ... bench: 231,689 ns/iter (+/- 1,885) = 4525 MB/s test bench_megabyte_specialized ... bench: 122,382 ns/iter (+/- 4,651) = 8568 MB/s test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured
- floatboth 5y agoThanks! Interesting result, baseline performance is impressive (pretty close to my R9 5950X which does 4853/5069 MB/s) but the CRC32 hardware is surprisingly mediocre (Cortex-A72 on Graviton1 does 14840/14483, Neoverse N1 on Graviton2 does 17066/19560)