-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Don't include ASCII characters in Unicode tables #146173
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?
Conversation
The ASCII subset of Unicode is fixed and will never change, so we don't need to generate tables for it with every new Unicode version. This saves a few bytes of static data and speeds up `char::is_control` and `char::is_grapheme_extended` on ASCII inputs. Since the table lookup functions exported from the `unicode` module will give nonsensical errors on ASCII input (and in fact will panic in debug mode), I had to add some private wrapper methods to `char` which check for ASCII-ness first.
If you want to modify |
The change itself looks fine, but let's check perf just in case. Reviewing the other discussion, it seems that the team would like to see the impact before potentially merging this. @bors2 try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
Don't include ASCII characters in Unicode tables
This comment has been minimized.
This comment has been minimized.
Queued cdb994f with parent a1208bf, future comparison URL. |
Split off from #145219