-
Notifications
You must be signed in to change notification settings - Fork 13
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
Might fix issue 58 #62
Conversation
Co-authored-by: Günther Foidl <[email protected]>
@gfoidl So hopefully you see what I had in mind. It still leaves open bug possibilities with big endian systems because we do not test. We are smart people but even smart people can't predict what could go wrong on systems they do not have access to. |
Yep, that's fine. My mind was too knotty here... In #49 care needs to be taken at csFastFloat/csFastFloat/Utils/Utils.cs Lines 38 to 42 in c108400
csFastFloat/csFastFloat/Utils/Utils.cs Lines 55 to 59 in c108400
The |
@gfoidl I am aware, but this is guarded... See... unsafe internal static bool is_made_of_eight_digits_fast(ulong val)
{
// We only enable paths depending on this function on little endian
// platforms (it happens to be effectively nearly everywhere).
return BitConverter.IsLittleEndian && (((val & 0xF0F0F0F0F0F0F0F0) |
(((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) ==
0x3333333333333333);
} So |
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.
Then it's perfect, simple and clean 👍
Merging with approval from @gfoidl |
Fixes #58