by ReaLNero · 5y ago · 0 comments
Don't skimp on RAM or buy into the hype that ARM halves the amount of required RAM - it's total BS.
https://github.com/srijs/rust-crc32fast/pull/6
(Get rust nightly via https://rustup.rs, pull the repo, run: cargo bench --features nightly)
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 measuredAnd the 5nm M1 has ~2.5Gflops/W which is not a huge increase compared to the 28nm Pi 4 at 2Gflops/W.
No-moores law in effect. Game Over!
Just want something that is more "apples to apples" (no pun intended but yes... lol)
Edit: Ok that is some sort of SIMD/GPU... I need figures for the raw CPU that can also do general purpose calculations and branches!
Maybe MIPS is a better "apples to apples" measurement?
I just ran it on CPU, single core (no pinning), just using the aarch64 fmla instruction.
Using pure BLAS (multithreaded, with the MM ISA extension), I get like 1.2TFlops in fp32 on the whole device. Code for the blas test: https://jott.live/code/blas_test.cc