[nflug] PHP (switch vs. nested if)

Roelant Ossewaarde rao3 at buffalo.edu
Thu Feb 21 15:31:01 EST 2008


On Feb 21, 2008, at 3:08 PM, Rob Dege wrote:

>
> nah, this won't work, since the arrays I'm referencing are already  
> two-dimensional arrays.  I mean I could create one large 2-dim  
> array, and pass that to each page every single time, but that would  
> take up more memory than it would need to.
>
> Each 2-dim array has at least 5 entries.  So that would be over 400  
> entries in on big array.  Seems bloated to load that big of an  
> array when I only need 5 entries from it.

Not at all. Really, trust memory management to your compiler and  
interpreter, they're better at it. A 400-entry array is not  
necessarily slower to access than a 10-entry array. I have only one  
pair of keys, and I lose it all the time; however, I have many, many,  
books, and I don't lose track of them at all, because they are well  
organized.

Someone once told me, size doesn't matter... She must've been an  
experienced programmer too.



More information about the nflug mailing list