-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Optimize core::unicode::printable
.
#139540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Optimize core::unicode::printable
.
#139540
Conversation
rustbot has assigned @workingjubilee. Use |
This comment has been minimized.
This comment has been minimized.
1a57f45
to
9109550
Compare
r? libs |
r? libs |
r? libs |
Not sure if he's a libs reviewer, but Manish is probably the best person to review anything Unicode. r? @Manishearth |
This appears to be an optimization. It doesn't seem to be doing anything super Unicodey; it appears to be doing some byte lookup optimizations. I don't think I have the bandwidth to review this right now. I'm wary about the I'd also suggest rewriting it so that the actual Rust code does not need to be autogenerated, just some constants and a small match for the large parts. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0c06957
to
9e66027
Compare
This comment has been minimized.
This comment has been minimized.
36cd81d
to
2acf703
Compare
r? @jhpratt |
I really am not familiar with this kind of code; I passed off for a reason. r? libs |
2acf703
to
2d8509c
Compare
@jhpratt, to be fair, I am also only slightly familiar with the code. 😄 I know what it does, but not how the underlying Unicode logic works. This PR doesn't change the logic, it only refactors the code to make it easier to reason about why the bounds checks are unneeded. |
2d8509c
to
66ada05
Compare
Follow-up to #138024, which apparently still wasn't enough to fully optimize
char::escape_debug
.Again, this only seems to make a difference on embedded targets, e.g.
thumbv7m-none-eabi
.