rust/library/core/src/num
Dylan DPC 4af965e732
Rollup merge of #81837 - gilescope:to_ascii_speedups, r=dtolnay
Slight perf improvement on char::to_ascii_lowercase

`char::to_ascii_lowercase()` was checking if it was ascii and then if it was in the right range. Instead propose to check once (I think removing a compare and a shift in the process: [godbolt](https://godbolt.org/z/e5Tora) ).

before:
```
        test char::methods::bench_to_ascii_lowercase                    ... bench:      11,196 ns/iter (+/- 632)
        test char::methods::bench_to_ascii_uppercase                    ... bench:      11,656 ns/iter (+/- 671)
```
after:
```
         test char::methods::bench_to_ascii_lowercase                    ... bench:       9,612 ns/iter (+/- 979)
         test char::methods::bench_to_ascii_uppercase                    ... bench:       8,241 ns/iter (+/- 701)
```

(calling u8::to_ascii_lowercase and letting that flip the 5th bit is also an option, but it's more instructions. I'm thinking for things around ascii and char we want to be as efficient as possible.)
2021-02-23 02:51:47 +01:00
..
dec2flt Auto merge of #81427 - klensy:eat-digits, r=m-ou-se 2021-02-20 07:31:43 +00:00
flt2dec rename MaybeUninit slice methods 2020-09-05 17:24:22 +02:00
shells Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
bignum.rs Use T::BITS instead of size_of::<T> * 8. 2020-09-19 06:54:42 +02:00
diy_float.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
error.rs Apply suggested changes 2020-10-26 18:14:12 +00:00
f32.rs Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
f64.rs Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
int_macros.rs Rollup merge of #81904 - jhpratt:const_int_fn-stabilization, r=jyn514 2021-02-10 12:24:23 +09:00
mod.rs Move const def nearer usage. 2021-02-14 18:23:30 +00:00
nonzero.rs Add NonZeroUn::is_power_of_two 2021-01-16 19:27:51 -08:00
uint_macros.rs Rollup merge of #81904 - jhpratt:const_int_fn-stabilization, r=jyn514 2021-02-10 12:24:23 +09:00
wrapping.rs Remove all doc_comment!{} hacks by using #[doc = expr] where needed. 2020-12-30 22:49:08 +01:00