andioop@programming.dev to Programming Horror@programming.devEnglish · edit-29 months agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square55fedilinkarrow-up1215arrow-down121
arrow-up1194arrow-down1imageGod I wish there was an easier way to do thisprogramming.devandioop@programming.dev to Programming Horror@programming.devEnglish · edit-29 months agomessage-square55fedilink
minus-squareMuchPineapples@lemmy.worldlinkfedilinkarrow-up8·edit-29 months agoThis is the way. Modulo takes too long to compute, bitwise compare should be a lot faster. return !(number & 0x1);
minus-squarerecursive_recursion [they/them]@programming.devlinkfedilinkEnglisharrow-up5·edit-29 months agooh shit yo this comment chain is pretty awesome, I learned a lot from this thanks!
This is the way. Modulo takes too long to compute, bitwise compare should be a lot faster.
return !(number & 0x1);
oh shit yo
this comment chain is pretty awesome, I learned a lot from this thanks!