diff options
| -rw-r--r-- | library/core/src/num/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 19419334839..a833f4025c2 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -1094,8 +1094,8 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par for &c in digits { // When `radix` is passed in as a literal, rather than doing a slow `imul` - // then the compiler can use a shift if `radix` is a power of 2. - // (*10 can also be turned into *8 + *2). + // the compiler can use shifts if `radix` can be expressed as a + // sum of powers of 2 (x*10 can be written as x*8 + x*2). // When the compiler can't use these optimisations, // there is a latency of several cycles so doing the // multiply before we need to use the result helps. |
