]> git.lizzy.rs Git - rust.git/commit
Bit-magic for faster is_char_boundary
authorRaph Levien <raph@google.com>
Sun, 10 Apr 2016 00:11:20 +0000 (17:11 -0700)
committerRaph Levien <raph@google.com>
Sun, 10 Apr 2016 00:16:54 +0000 (17:16 -0700)
commitb2db97347bc4373deea24eb7b7c6ecffb117fd8c
treeb56edebcd2012961de7fa7ecb829bb4c5afd2869
parent526f2bf5c534308193246e13ab2da8b3c0cf3cbb
Bit-magic for faster is_char_boundary

The asm generated for b < 128 || b >= 192 is not ideal, as it computes
both sub-inequalities. This patch replaces it with bit magic.

Fixes #32471
src/libcore/str/mod.rs