Hoist the float conversion out of the inner loop. (GH-10430)
Currently, the *n* and *total* variables get converted to floats each time they are multiplied by random(). This minor tweak does the conversion just once and gets a small speedup (approx 3%).
R
Raymond Hettinger committed
0a18e0510a145427d8ff1864a011c81ea02cdcd4
Parent: cf5863f
Committed by Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
on 11/9/2018, 10:39:50 AM