Wednesday, December 28, 2011

Integer division optimization

The idea is to replace division with multiplication and bit shift.

Found it interesting (GCC does it for you, but FPC not):
 
http://www.codeproject.com/KB/cs/FindMulShift.aspx

http://libdivide.com/

No comments: