-
Notifications
You must be signed in to change notification settings - Fork 332
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
merge isAsciiWhitespace implementations #2803
Conversation
f5810f1
to
e05c0ac
Compare
e05c0ac
to
c4b2d5e
Compare
b2ed219
to
30f7bb5
Compare
270c5f5
to
f943917
Compare
return result; | ||
}(); | ||
|
||
constexpr bool isAsciiWhitespace(uint8_t c) noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conceptually, this could affect performance – isAsciiWhitespace()
does a single table lookup so having it defined in a different source file will make using it much slower based on needing a function call now. The compiler might just be able to inline it properly if LTO is enabled (such as with the downstream release build), so this is non-blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the implementation to encoding.h and made it constexpr again. Since it is an extremely small fixed array, I don't think it would have any negative impact, but let me know if you disagree. I can change it back without any hassle.
f943917
to
a5eae95
Compare
a5eae95
to
413d5a5
Compare
...just in case... |
Merges 2 implementations and introduces 2 new cc_library targets on bazel.