Conversation
|
Thanks for your pull request and interest in making D better, @deadalnix! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8588" |
|
What is required to unblock this? |
Try rebasing. |
|
@thewilsonator this is on top of master already. |
|
then just force-push to restart the CIs |
Using recent version of LDC, here are the codegen I get:
```
lea eax, [rdi - 48]
cmp eax, 74
ja .LBB2_1
lea ecx, [rdi - 97]
mov al, 1
cmp ecx, -39
jb .LBB2_4
add edi, -65
cmp edi, 26
setb al
.LBB2_4:
ret
.LBB2_1:
xor eax, eax
ret
```
And now:
```
lea eax, [rdi - 48]
cmp eax, 9
setb cl
or edi, 32
add edi, -97
cmp edi, 26
setb al
or al, cl
ret
```
Which is much better all around: less instructions, no branches, etc...
I will note that doing `isDigit(c) || isAlpha(c)` also gives me good codegen using LDC, but I chose against it as DMD fails to inline properly and the end result is pretty bad.
Using recent version of LDC, here are the codegen I get:
And now:
Which is much better all around: less instructions, no branches, etc...
I will note that doing
isDigit(c) || isAlpha(c)also gives me good codegen using LDC, but I chose against it as DMD fails to inline properly and the end result is pretty bad.