Skip to content

Commit a6d98d8

Browse files
committed
generalize warning
1 parent 72a5cbb commit a6d98d8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

library/std/src/f32.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,10 @@ impl f32 {
206206
/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
207207
/// error, yielding a more accurate result than an unfused multiply-add.
208208
///
209-
/// Using `mul_add` *can* be more performant than an unfused multiply-add if
209+
/// Using `mul_add` *may* be more performant than an unfused multiply-add if
210210
/// the target architecture has a dedicated `fma` CPU instruction. However,
211-
/// this is not always true, and care must be taken not to overload the
212-
/// architecture's available FMA units when using many FMA instructions
213-
/// in a row, which can cause a stall and performance degradation.
211+
/// this is not always true, and will be heavily dependant on designing
212+
/// algorithms with specific target hardware in mind.
214213
///
215214
/// # Examples
216215
///

library/std/src/f64.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,10 @@ impl f64 {
206206
/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
207207
/// error, yielding a more accurate result than an unfused multiply-add.
208208
///
209-
/// Using `mul_add` *can* be more performant than an unfused multiply-add if
209+
/// Using `mul_add` *may* be more performant than an unfused multiply-add if
210210
/// the target architecture has a dedicated `fma` CPU instruction. However,
211-
/// this is not always true, and care must be taken not to overload the
212-
/// architecture's available FMA units when using many FMA instructions
213-
/// in a row, which can cause a stall and performance degradation.
211+
/// this is not always true, and will be heavily dependant on designing
212+
/// algorithms with specific target hardware in mind.
214213
///
215214
/// # Examples
216215
///

0 commit comments

Comments
 (0)