-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
lib: replace charCodeAt with fixed Unicode #32758
Conversation
Can you explain what the motivation here is? If the goal is avoiding a few calls to |
@addaleax Yes, in order to avoid unnecessary calls to |
@addaleax Or we can move to // Alphabet chars.
CHAR_UPPERCASE_A: 65, /* A */
CHAR_LOWERCASE_A: 97, /* a */
CHAR_UPPERCASE_Z: 90, /* Z */
CHAR_LOWERCASE_Z: 122, /* z */
CHAR_UPPERCASE_C: 67, /* C */
CHAR_LOWERCASE_B: 98, /* b */
CHAR_LOWERCASE_E: 101, /* e */
CHAR_LOWERCASE_N: 110, /* n */ |
@rickyes Yeah, I guess that would be consistent… I’m good with that 👍 I’m also good with doing nothing and keeping the code as straightforward as possible. |
done. |
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 would rather keep the code as it is right now but I won't block this, since other collaborators seem to agree with this change.
I feel the same way as @BridgeAR. |
@jasnell @lpinca @trivikr @himself65 PTAL: it would be good to get some feedback about the mentioned concerns. |
agree with that |
Not sure what the concerns are @BridgeAR ... this LGTM |
8ae28ff
to
2935f72
Compare
PR-URL: #32758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
Landed in 9918bdf |
PR-URL: #32758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: #32758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: #32758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: #32758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: #32758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes