What has a better performance: multiplication or division?
Which version is faster: x * 0.5 or x / 2 ? I've had a course at the university called computer systems some time ago. From back then I remember that multiplying two values can be achieved with comparably "simple" logical gates but division is not a "native" operation and requires a sum register that is in a loop increased by the divisor and compared to the dividend. Now I have to optimise an algorithm with a lot of divisions. Unfortunately it's not just dividing by two, so binary shifting is not an option. Will it make a difference to change all divisions to multiplications ? Update: I have c
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.