Fast Modulo help needed

i have also other functions on the run i want to save speed and memory