Improved the algorithm by avoiding not necessary divisions and using unsafe, trying to avoid to stress L1 cache coherency protocol as far as possible.