• MuchPineapples
    link
    fedilink
    8
    edit-2
    10 months ago

    This is the way. Modulo takes too long to compute, bitwise compare should be a lot faster.

    return !(number & 0x1);