Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42387 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35734 invoked from network); 27 Dec 2008 15:11:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Dec 2008 15:11:38 -0000 Authentication-Results: pb1.pair.com header.from=brianm@dealnews.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=brianm@dealnews.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dealnews.com from 72.5.90.27 cause and error) X-PHP-List-Original-Sender: brianm@dealnews.com X-Host-Fingerprint: 72.5.90.27 smtp.dealnews.com Linux 2.5 (sometimes 2.4) (4) Received: from [72.5.90.27] ([72.5.90.27:34773] helo=smtp.dealnews.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/2F-47432-9A546594 for ; Sat, 27 Dec 2008 10:11:38 -0500 Received: (qmail 21907 invoked from network); 27 Dec 2008 15:11:35 -0000 Received: from unknown (HELO mail.dealnews.com) (10.1.10.7) by -H with ESMTPS (DHE-RSA-AES256-SHA encrypted); 27 Dec 2008 15:11:35 -0000 Received: (qmail 14787 invoked from network); 27 Dec 2008 15:11:34 -0000 Received: from 100.100.1.10.in-addr.arpa (HELO ?10.1.100.100?) (10.1.100.100) by -H with SMTP; 27 Dec 2008 15:11:34 -0000 Message-ID: <495645A5.4080802@dealnews.com> Date: Sat, 27 Dec 2008 09:11:33 -0600 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b1pre) Gecko/20081006 Shredder/3.0a3 MIME-Version: 1.0 To: Kevin Waterson CC: internals@lists.php.net References: <5faa7b820812260106p6f24bf0ct49ef574e5ed4e2c2@mail.gmail.com> <20081227005523.2961ecd4.kevin@phpro.org> <5faa7b820812261004j599e1aafo6fab154063c34cca@mail.gmail.com> <20081227191015.560d4a0d.kevin@phpro.org> In-Reply-To: <20081227191015.560d4a0d.kevin@phpro.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Proposal: array_flatten function From: brianm@dealnews.com (Brian Moon) On 12/27/08 2:10 AM, Kevin Waterson wrote: > The last thing that is needed, is more array functions.. I would agree except that doing lots of work on arrays in user space consumes a lot of memory because of the number of opcodes used when working on removing/adding things to the array. We created an extension for Phorum to do our array tree sorting for those users that had large threads of messages (1000+). We found that PHP would quickly consume a memory limit of 128MB and use tons of CPU when working in user space to simply reorder an array. So, in that case, doing the work in a good C function will beat out user space work on arrays. -- Brian Moon Senior Web Engineer ------------------------------ When you care enough to spend the very least. http://dealnews.com/