commit | 0a18e0510a145427d8ff1864a011c81ea02cdcd4 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | Fri Nov 09 02:39:50 2018 -0800 |
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Fri Nov 09 02:39:50 2018 -0800 |
tree | 1f9e4f52be6672e8fc802e0276c4638db1eaf28c | |
parent | cf5863faabe011a61827b9b9982dba3d6a381f0f [diff] |
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%).