Skip to content
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

char::is_ascii_digit() is slower than char::is_digit(10) #68453

Closed
ThomasdenH opened this issue Jan 22, 2020 · 4 comments
Closed

char::is_ascii_digit() is slower than char::is_digit(10) #68453

ThomasdenH opened this issue Jan 22, 2020 · 4 comments

Comments

@ThomasdenH
Copy link

Using the method is_ascii_digit on a char is about 17% slower than using is_digit(10). I wouldn't expect there to be a difference, of if there was, I would expect the former to be faster. Could this be improved or are the two not actually equivalent?

@ThomasdenH
Copy link
Author

I just saw #67143, which I think fixes this.

@blankname
Copy link

Might want to re-open this as #67143 has been closed.

@ThomasdenH
Copy link
Author

Alright.

@ThomasdenH ThomasdenH reopened this Jan 25, 2020
@LeSeulArtichaut
Copy link
Contributor

This seems like a duplicate of #65127, which has been fixed by #67585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants