Moves percentage calculation outside heavy loop

Not much, but with zillions of rows of BIG DATA ever little calculation
adds up on the CPU