My situation is the same as in this question, but instead of using floats, I'm using integers. I feel like this difference might be significant because there might be some bit twiddling hacks that can be used to wrap the value into the range.
One use case for wrapping a value into a range is assigning a value to a bucket in a hash table, like this (range of [0,len(buckets)]
):
bucket = buckets[hash(key) % len(buckets)]
If we are continuously adding values to a hash table, it might be worthwhile to optimize this operation.