 <p>Be careful about assuming that int operations are always faster than float operations. In isolation they may be, but <a href="http://assemblyrequired.crashworks.org/2009/01/12/why-you-should-never-cast-floats-to-ints/" rel="nofollow noreferrer">moving data between a float register and an int register is shockingly slow on modern processors</a>. So once your data is on a float, you should keep it on a float for further computation.</p>