nbabel
nbabel copied to clipboard
Rust SIMD on stable
This change allows to run the Rust SIMD code on stable Rust.
I was trying to make a version of this to run in parallel. But I couldn't figure out a easy way without using message passing, Mutex or Arc. I wish I know more Rust to have a easy way out. Wrt this PR, idk how good it will perform, since idk how wide
works in general with the several SIMD features out there.
@paugier what you think? Could this be merged as is?
@paugier I just added a parallel version for Rust. On my machine I got the following
time ./nbabel-nbody/target/release/nbabel ../data/input2k 2
Running Parallel SIMD version
Final dE/E = -0.44307369910184735
real 0m40,392s
user 4m41,494s
sys 0m1,242s
time julia -t8 -O3 --check-bounds=no -- run.jl nbabel5_threads.jl ../data/input2k false
real 0m34,271s
user 4m2,255s
sys 0m1,009s
Since it's a very naive and rough translation of the nbabel5_threads.jl
, I'd expect there's room to improve there. For the 1k file, both Rust and Julia have similar performance!