For 100 operations it might seem fast but for 10000 operations it starts to show a good difference.
here is the runtime of three functions with 10000 operations
6.550000000160594
2.3500000001508425
2.0000000000575113
Unfortunately four numbers doesn't explain much.
Modulo is usually one machine code instruction. Other parts of the program will probably dwarf its execution time, such as I/O.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For 100 operations it might seem fast but for 10000 operations it starts to show a good difference.
here is the runtime of three functions with 10000 operations
6.550000000160594
2.3500000001508425
2.0000000000575113
Unfortunately four numbers doesn't explain much.
Modulo is usually one machine code instruction. Other parts of the program will probably dwarf its execution time, such as I/O.