Skip to content
Vector benchmakrs with SIMD instructions
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches
src
.gitignore
Cargo.toml
README.md

README.md

Vector benchmarks

Note: As show by Cameron Hart these results are not correct

This project contains research exploring SIMD instructions in Rust, specifically SSE, to speed up the computation of vector dot products for use in 3D graphics. From the benchmarks demonstrated here we can conclude that Rust's inability to inline functions that use SIMD makes the option drastically slower than the naive implementation. Notably even when inlining the SIMD version it is not faster than the naive option.

Result on Macbook Pro 13"(mid 2012) with Intel Core i5 2.5Ghz

running 4 tests
test bench_f32            ... bench:         315 ns/iter (+/- 36)
test bench_f32_sse        ... bench: 218,383,192 ns/iter (+/- 6,526,505)
test bench_f32_sse_inline ... bench:         312 ns/iter (+/- 58)
test bench_f64            ... bench:         315 ns/iter (+/- 90)
  • bench_f32 uses Vector<f32>.
  • bench_f32_sse uses f32 SIMD instructions without inlining.
  • bench_f32_sse_inlin uses f32 SIMD instructions that have been manually inlined.
  • bench_f64 uses Vector<f64>.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.