Commit 1c3131c
committed
Auto merge of #125129 - cuviper:branchless-len_utf8, r=<try>
Remove the branches from `len_utf8`
This changes `len_utf8` to add all of the range comparisons together,
rather than branching on each one. We should definitely test performance
though, because it's possible that this will pessimize mostly-ascii
inputs that would have had a short branch-predicted path before.1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1739 | 1739 | | |
1740 | 1740 | | |
1741 | 1741 | | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
1751 | 1745 | | |
1752 | 1746 | | |
1753 | 1747 | | |
| |||
0 commit comments