Fix modulo performance

Thanks coyotte for hinting.
Note that the branch is remove by both GCC and Clang.
Merge pull request #249 from joker-eph/modulo

Fix modulo performance (thanks coyotte)