Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46725 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2151 invoked from network); 14 Jan 2010 01:03:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2010 01:03:39 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.220.227 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.227 mail-fx0-f227.google.com Received: from [209.85.220.227] ([209.85.220.227:45256] helo=mail-fx0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/4E-00773-35D6E4B4 for ; Wed, 13 Jan 2010 20:03:33 -0500 Received: by fxm27 with SMTP id 27so341523fxm.23 for ; Wed, 13 Jan 2010 17:02:59 -0800 (PST) Received: by 10.103.85.4 with SMTP id n4mr11985mul.128.1263430979729; Wed, 13 Jan 2010 17:02:59 -0800 (PST) Received: from ?192.168.200.22? (c-98-234-184-167.hsd1.ca.comcast.net [98.234.184.167]) by mx.google.com with ESMTPS id i5sm287733mue.55.2010.01.13.17.02.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 13 Jan 2010 17:02:59 -0800 (PST) Message-ID: <4B4E6D40.2080502@lerdorf.com> Date: Wed, 13 Jan 2010 17:02:56 -0800 User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Tim Starling CC: internals@lists.php.net References: <4B4DABED.4060202@easyflirt.com> <4B4DBF40.5040801@easyflirt.com> <4B4DCFDA.6090206@dmi.me.uk> <4B4DF01A.1080103@wikimedia.org> <4B4DFBDE.1020906@lerdorf.com> <4B4E5943.3000706@wikimedia.org> <4B4E5D5B.9020805@zend.com> <4B4E6BE5.1070404@wikimedia.org> In-Reply-To: <4B4E6BE5.1070404@wikimedia.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] About optimization From: rasmus@lerdorf.com (Rasmus Lerdorf) Tim Starling wrote: > Some other operations, like deleting items from the middle of the array > or adding items past the end (leaving gaps) would also have to trigger > conversion. The point would be to optimise the most common use cases for > integer-indexed arrays. I still say this isn't something most people run into. I have looked at a lot of code in a lot of different use cases and I always see things being cpu-bound long before it is memory-bound. -Rasmus