On Wed, Feb 26, 2003 at 09:05:03PM +0100, David Hedbor @ Pike developers forum wrote:
Most likely gain speed. On 32 bit computers operations on 32 bit integers is faster than of 64 bit ones, but 64 bit ones are faster than bignum.
Exactly. Bignums are too slow in case when maximum that is needed fits in 64 bits. And, to be honest, I hate automatic bignum2int and vice versa conversion - because there is _no control_ over it.
I still cannot understand why 0x80000000 is converted to bignum while it fits in 32 bits. Well, I know the official explanation, but it seems unlogical.
Unsigned ints would be nice as well, BTW :) I can explain why and where, if someone is interested.
NB: The excuse like "nobody really needs it" is not good enough, it remembers me "The 640K ought to be enough for everybody" and a lot of really useless (to majority) code in current Pike's core modules :)
Regards, /Al