Re: [Zend Engine 2] Bumping PHP to support 8byte integers
| From: | Jeroen van Wolffelaar | Date: | Sun, 23 Sep 2001 19:46:06 +0000 |
| Subject: | Re: [Zend Engine 2] Bumping PHP to support 8byte integers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66417@lists.php.net to get a copy of this message | ||
> 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))
An other advantage IMHO is that 64-bit integers can represent any integer
that can - in float format - be distinguished from it's neighbour.
Recall that C-double == PHP-float have at least 64-bits, so a mantissa of
<64bits. So any number n for which n and n+1 are distingwishable in 64-bit
floating point numbers, must fall in the range of 64-bit integers.
> 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...
>
> --Jeroen
>