-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsafe floating point optimizations #217
Comments
What specific optimizations are you referring to? |
Anything that is in std::intrinsics::*_fast For example: |
Generally with glam I have focussed on functionality that is in stable rust or have a clear path to stabilisation. These intrinsics are unstable and as far as I know there is no plan to stabilise them on the horizon (https://doc.rust-lang.org/beta/unstable-book/library-features/core-intrinsics.html). In general the question of how to do "fast math" in Rust is unanswered (see rust-lang/rust#21690 which has been around since 2015). This is one of the reasons I built glam around explicit SIMD usage. At some point perhaps Rust will get fast math support, but it might not be via explicit intrinsics, e.g. it could be a function attributes that allows the compiler optimise a block by disabling IEEE compliance, who knows. Therefore this isn't something I plan to spend time on. I would consider a PR but accepting it would depend on what the maintenance burden looked like. |
Oh okay, I totally understand. I might later work on a PR for this, so I think I'll keep this issue open for now if that's okay. |
This has been inactive for a while, closing. |
Hi, would it be possible to maybe have a feature gate for unsafe floating point optimizations within this crate? The ease of using SIMD vectors is really nice, and I think having the option of having the crate run even faster (at the expense of precision of course) would be a great addition.
The text was updated successfully, but these errors were encountered: