News for hackers. Stuff that matters.
Re:Packing a string of digits into an integer quickly by xcvb on Saturday July 08, 2023 @07:41PM (#36649868)
Looking at the code, it seems like it expects a string of the form "dddddddd?dddddd" where the '?' is any ascii character, and the code assumes the rest of the characters are ascii digits.

Specifically the line: `part2 = _pext_u64(part2, 0x0f000f0f0f0f0f0f);` seems to mask out that character.

Re:Packing a string of digits into an integer quickly by patrec on Saturday July 08, 2023 @08:13PM (#36650058)
Indeed, I hadn't noticed the 000 (rather than 0f0) in there! Thanks!
Re:Packing a string of digits into an integer quickly by vesinisa on Monday July 10, 2023 @12:25PM (#36668640)
Just noticed this pattern fits a basic ISO 8601 datetime string perfectly. ISO requires using 'T' in place of ?, but using space (0x20) there is pretty common.