Re: intdiv
- Posted by bill May 13, 2012
- 1517 views
I am somewhat surprised abs() should inline to be the same as yours.
perhaps the local definitions in the if and while make a difference.
Very miinor differenes can double the speed.
I have noticed that
if x and y then is about half as fast if x then if y then ...
That said, I prefer legibilty to microseconds for the most part.
Another very minor error:
The range of the integerss is mis-stated
as between -2^30 and 2^30+1.
I tend to check boundary conditions.