3 ms·
> The C version was ported to be the Rust one, it seems, and uses those intrinsics too. No. Although the Rust program was initially presented to me as a "port
by igouy 8y ago
> The C version was ported to be the Rust one, it seems, and uses those intrinsics too.
No. Although the Rust program was initially presented to me as a "port of fastest C SIMD variant" the programmer made additional optimizations not found in the C program:
- Moving the loop from outside into "bodies_advance(..)" (SSE pipelining(?))
- Bundle intermediate variables/arrays as struct NBodySim (caching)
- Fit array-sizes within struct NBodySim to the number of bodies (caching)
----
https://www.reddit.com/r/rust/comments/akgmef/rust_nbody_benchmark_ranks_1/ef5oy67/ https://www.reddit.com/r/rust/comments/akgmef/rust_nbody_ben...
- steveklabnik 8y agoNice, thanks!