You're not the only one that isn't following the inference/point here.

What would be an example of a real-life application of array usage that would be rendered faulty/unstable due to this limitation?

Michael B Allen wrote:
On 4/1/08, Sol Toure <[EMAIL PROTECTED]> wrote:
Good to know:
http://pankaj-k.net/weblog/2008/03/did_you_know_that_each_integer.html

I don't understand. Is this supposed to indicate that PHP is somehow
inefficient at storing array elements?

"a single integer value stored within an PHP array uses 68 bytes: 16
bytes for value structure (zval), 36 bytes for hash bucket, and 2*8 =
16 bytes for memory allocation headers."

That sounds fairly reasonable to me.

Note that each element does not incur a hash bucket. The bucket holds
a list. The blogger just wasn't smart enough to insert enough elements
to see elements hash to the same bucket.

Mike



_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to