rust/library
Dylan DPC 7726265ae0
Rollup merge of #95831 - redzic:xor-uppercase, r=workingjubilee
Use bitwise XOR in to_ascii_uppercase

This saves an instruction compared to the previous approach, which
was to unset the fifth bit with bitwise OR.

Comparison of generated assembly on x86: https://godbolt.org/z/GdfvdGs39

This can also affect autovectorization, saving SIMD instructions as well: https://godbolt.org/z/cnPcz75T9

Not sure if `u8::to_ascii_lowercase` should also be changed, since using bitwise OR for that function does not require an extra bitwise negate since the code is setting a bit rather than unsetting a bit. `char::to_ascii_uppercase` already uses XOR, so no change seems to be required there.
2022-04-09 18:26:30 +02:00
..
alloc Rollup merge of #95817 - oconnor663:doc_comment2, r=yaahc 2022-04-09 18:26:29 +02:00
backtrace@b02ed04a7e
core Rollup merge of #95831 - redzic:xor-uppercase, r=workingjubilee 2022-04-09 18:26:30 +02:00
panic_abort fix some unused constant warning on some Windows targets 2022-04-08 08:36:56 -04:00
panic_unwind
portable-simd
proc_macro Rollup merge of #95308 - bjorn3:more_stable_proc_macro, r=Mark-Simulacrum 2022-04-09 12:52:02 +02:00
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #95802 - RalfJung:unused-win, r=Dylan-DPC 2022-04-09 12:52:06 +02:00
stdarch@bcbe010614
test Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrum 2022-04-07 07:34:04 +00:00
unwind Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrum 2022-04-07 07:34:04 +00:00