Comment on Using SIMD for Parallel Processing in RustparentComments−the84722yThe function has to be made pub so it doesn't get optimized out as unusued private function.Godbolt is a better choice for looking at asm anyway. https://rust.godbolt.org/z/3Y9ovsoz9−hayley-patton2yNarrator: "The code did not, in fact, auto-vectorise."(There's only addsd/movsd instructions, which are add/move scalar-double; we want addpd/movpd which are add/move packed-double in vectorised code.)−KineticLensman2yAh, that worked, thanks!Although I can now see why he didn't include the output directly.
Comments
The function has to be made pub so it doesn't get optimized out as unusued private function.
Godbolt is a better choice for looking at asm anyway. https://rust.godbolt.org/z/3Y9ovsoz9
Narrator: "The code did not, in fact, auto-vectorise."
(There's only addsd/movsd instructions, which are add/move scalar-double; we want addpd/movpd which are add/move packed-double in vectorised code.)
Ah, that worked, thanks!
Although I can now see why he didn't include the output directly.