Re: intdiv

new topic     » goto parent     » topic index » view thread      » older message » newer message

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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu