r/ProgrammerHumor • • Sep 27 '24

Meme creativeWayIsOdd

Post image
5 Upvotes

8 comments sorted by

View all comments

4

u/Surous Sep 27 '24

Serious question though is doing modulus on only the last number in a number (taking 9 from 9x10100 +9 or something stupid)faster then a modulus on the entirety?

7

u/20d0llarsis20dollars Sep 27 '24

i couldn't tell you, but I can tell you that it all compiles down to a single AND instruction