Re: Fw: Bumping PHP to support 8byte integers

From: Date: Sun, 23 Sep 2001 20:49:41 +0000
Subject: Re: Fw: Bumping PHP to support 8byte integers
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-66423@lists.php.net to get a copy of this message
> ["Jeroen van Wolffelaar" <jeroen@a-eskwadraat.nl>] >> Hi, >> >> For a scripting language, integers should IMHO be bounded by a number >> that will reasonally not be bound by numbers that will be used in >> normal scripts. >> >> That is currently not the case, 4 bytes are insufficient IMHO. Why not >> make sure PHP uses 8 bytes at least? Or are there platforms not >> supporting 8byte integers? I believe most popular do... (at least >> linux on i586 and i686, windows and Solaris (I tested SunOS 5.6)) >> >> For implementation, I think that we should introduce p_int and p_float >> typedefs for php-integer and php-float anyway, and changing THAT isn't >> a problem. >> >> About preformance/memory, I think that's not an issue. Making strings >> unicode will be much more heavy for PHP... > > Does anyone have experience with moving a large system from 4-byte to > 8-byte integers? What are other languages doing? > > My gut (the ultimate risk management tool) thinks it's dangerous to > start messing with internal types without knowing exactly what the > consequences are, preferably with some experience (own or others) to > back it up. I would be very worried about making numbers 8 bytes by default, unless the CPU supports them natively. There are a lot of consequenses involved with something like that. Assuming a 32 bit register system (x86) integers will no longer fit in registers. This changes EVERYTHING, from passing them to functions, to how arithatic is performed. Nor am I sure what the state of compilers are in all PHP's supported environments, do the compilers handle "long long?"

« previous php.dev (#66423) next »