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

Create version that does not automatically skip leading spaces #71

Open
lemire opened this issue Mar 1, 2021 · 0 comments
Open

Create version that does not automatically skip leading spaces #71

lemire opened this issue Mar 1, 2021 · 0 comments

Comments

@lemire
Copy link
Collaborator

lemire commented Mar 1, 2021

In C#...

System.Buffers.Text.Utf8Parser.TryParse(x, out double d, out int consumed)

will not skip leading spaces whereas

Double.Parse(" 11  ")

will...

Meanwhile, the csFastFloat functions always skip leading spaces.

To get fair comparisons, we should create versions (maybe just for ASCII strings) of our functions which do not skip leading spaces.

Note that the cost of skipping leading spaces may not be a small as one would hope. It might cost several cycles and it adds several (predictable?) branches.

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

1 participant