Re: Re: PHP on 64bit Ubuntu
| From: | steve | Date: | Thu, 04 Sep 2008 06:59:18 +0000 |
| Subject: | Re: Re: PHP on 64bit Ubuntu | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279486@lists.php.net to get a copy of this message | ||
Yes and No. PHP could be storing bools as a bit packed in a long word.
But your point about compiling is sill more valid. Compiling 32bit
instructions may use instructions that offer off-alignment memory
referencing. That is -- a bool may actual take only a byte in a 32bit
system. That instruction may not be available in 64bit mode. Thus that
bool taking a whole long word. 8x the space, not twice.
Let's write some assembly!
On Wed, Sep 3, 2008 at 11:41 PM, Robert Cummings <robert@interjinn.com> wrote:
> On Wed, 2008-09-03 at 23:39 -0700, steve wrote:
>> > A word boundary usually matches the natural integer size for the
>> > processor. In the case of a 32 bit processor it would be 32 bits, in the
>> > case of a 64 bit processor it would be 64 bits. This may or may not hold
>> > for windows, but more than likely the word size doubles between the 32
>> > bit architecture and the 64 bit architecture. As such due to alignment
>> > we would still see only a maximal doubling of space. Fringe cases may
>> > exist to satisfy your argument, but I doubt PHP falls into this
>> > category... especially as relates to a packaged binary or default
>> > configure.
>>
>> I didn't mean for the PHP binary itself, but the PHP code written in
>> PHP that is parsed:
>>
>> $test = true;
>
> But the PHP binary is what allocates the memory. It all comes down to
> how the PHP binary was compiled.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>