Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14035 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46688 invoked by uid 1010); 9 Dec 2004 11:55:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42210 invoked from network); 9 Dec 2004 11:53:53 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 9 Dec 2004 11:53:53 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id iB9BrqDJ012795 for ; Thu, 9 Dec 2004 12:53:52 +0100 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id iB9BrloF012767; Thu, 9 Dec 2004 12:53:47 +0100 Date: Thu, 9 Dec 2004 12:53:47 +0100 (CET) X-X-Sender: derick@localhost To: Matt W cc: internals@lists.php.net In-Reply-To: <002e01c4dde1$b69fe9d0$0100a8c0@pc1> Message-ID: References: <002e01c4dde1$b69fe9d0$0100a8c0@pc1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdimedia.nl Subject: Re: [PHP-DEV] Memory needed for arrays? And major performance problems filling an array From: derick@php.net (Derick Rethans) On Thu, 9 Dec 2004, Matt W wrote: > Before I describe my issue, I had been wondering how I can tell/estimate > how much memory PHP will use for arrays? Is there at least a rough formula > someone can tell me? 42 * number of array elements + size of keys + data > This is disappointing, especially being caused by an array that doesn't > seem too outrageously large (and I'd like to go larger). :-( It's going to > suck if I can't come up with a way to get it faster... Is there anything > that would be different on a version newer than 4.3.6, as I didn't try any > yet? Or if it's some Windows thing, then I don't care as much. > > Comments, suggestions? Make a custom C extension.. I don't know why you needs arrays this large, but it sounds like a application design flaw. Derick