Multiply rather than Divide

This tip submitted by Reese Moore on 2006-01-07 21:19:44. It has been viewed 20091 times.
Rating of 7.0 with 186 votes



When you need to divide (especially by 2), consider multiplying rather than dividing.

ex.
Use " * 0.5 " rather than " / 2 "
( 2 * 0.5 is faster than 2 / 2, and results in the same thing)



More tips

Help your fellow programmers! Add a tip!