News for hackers. Stuff that matters.
Re:Faster Integer Parsing by userbinator on Thursday June 25, 2020 @08:27PM (#23647424)
https://en.wikipedia.org/wiki/Luhn_algorithm

There's exactly one division required.

(Implementing it using vector instructions is left as an exercise for the reader. A very elementary exercise, so I encourage you to try it if you're curious about SSE and such.)

Re:Faster Integer Parsing by Arnavion on Thursday June 25, 2020 @11:49PM (#23648504)
Luhn's algorithm works on a digit string, not a single integer.
Re:Faster Integer Parsing by im3w1l-alt on Saturday June 27, 2020 @01:03PM (#23662998)
Checking divisibility by a known constant can be done in a better way than doing a division.

https://lemire.me/blog/2019/02/08/faster-remainders-when-the...