Skip to content
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

[Needs Expert Help] Using sqrt on the less common CPU types. #372

Closed
Lokathor opened this issue Aug 21, 2019 · 1 comment
Closed

[Needs Expert Help] Using sqrt on the less common CPU types. #372

Lokathor opened this issue Aug 21, 2019 · 1 comment

Comments

@Lokathor
Copy link

Heya folks,

As part of the 2019 Embedded-wg Wishlist I've opened a PR to move sqrt from std into core:

rust-lang/rust#63455

However, a current blocker is to make sure that this will not cause any performance regression on any target. Part of this involves knowing what LLVM will do on the less common CPU types, so I'm coming to you because I hope you know, or know how to find out.

  • Intel, ARM, Wasm32: all fine
  • Mips, PowerPC, Risc-V: ???

In Brief: Ideally we'd like core::intrinsics::sqrtf32() to generate a hardware instruction if that CPU supports that, and of it doesn't have a hardware instruction we want to male sure that the software sqrt in the libm crate (exposed on some targets via compiler-builtins) is either at least as fast as the system libm library or doesn't get exposed on that target so that the system libm gets used.

This is where yall come in. Hopefully you folks have ways to check the builds on those targets and ways to check the system libm and run benchmarks and so on. Or you know people who do perhaps.

@BartMassey
Copy link
Member

Closing this as part of the 2024 triage.

This discussion is better done on rust-lang/rfcs/#2505, which proposes stabilizing core::intrinsics::sqrt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants