Multiply rather than Divide

This tip submitted by Reese Moore on 2006-01-07 21:19:44. It has been viewed 27758 times.
Rating of 5.5 with 298 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!