Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7461 invoked from network); 6 Mar 2013 16:41:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2013 16:41:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain zend.com does not designate 209.85.219.47 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.219.47 mail-oa0-f47.google.com Received: from [209.85.219.47] ([209.85.219.47:45676] helo=mail-oa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/85-03015-1B177315 for ; Wed, 06 Mar 2013 11:41:22 -0500 Received: by mail-oa0-f47.google.com with SMTP id o17so12707863oag.20 for ; Wed, 06 Mar 2013 08:41:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=yDaDTiek/+5Ky4d7uDo9fZ7b5r92AfMOJgnq3xHGwTM=; b=Fqvxy3aknsdu8iu3XjW/4xr91I+oq4wOpLppr9bWrd36IFKtNudzdtyAMezUhPbmTH EDXeAAW+LrkPCyz+pemSgaCAOB8lqWbUMa87udemMasbnCGscVNTv3GCRXMypoFUs9cG BEkitldC8P219GVbvKOS0U1kl5VYYmepJ0cJw+TvLn6+liGLDKsAuPkKh6qYlA9i7WVu WVjD4pGV30c9auKJpKB2wy5EtEtDKGWECaO4zFy5jLCU9TiFX8seDB3jb5Kmk1QiFEXx KoQ5r4WtGh+56A8RT6/KXvakvaxqg+foRgZRByte9ZaZgC95z2wD7YDBz6nvMANJ4FId KJMQ== MIME-Version: 1.0 X-Received: by 10.60.24.72 with SMTP id s8mr23380539oef.68.1362588079261; Wed, 06 Mar 2013 08:41:19 -0800 (PST) Received: by 10.182.242.79 with HTTP; Wed, 6 Mar 2013 08:41:19 -0800 (PST) In-Reply-To: References: Date: Wed, 6 Mar 2013 19:41:19 +0300 Message-ID: To: Nikita Popov Cc: PHP internals , Zeev Suraski , Andi Gutmans Content-Type: multipart/alternative; boundary=e89a8ff1c8aa70f83004d74442d4 X-Gm-Message-State: ALoCoQkW+q0MrlSO3F+rgx3bSKmxTQuQpdcjXsgRUwlPwgYg5vWX1eoVdTXmN0bVDDawNo5V0tW8wNuGl7/pTKu9WgXLKwawGXiE3TKvDcCOMfdE4vjoTEDLqdCkTHJUr26vGletawFR Subject: Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach From: dmitry@zend.com (Dmitry Stogov) --e89a8ff1c8aa70f83004d74442d4 Content-Type: text/plain; charset=UTF-8 Hi Nikita, few notes about the patch... - you may avoid estrndup() in zend_hash_current_key_zval_ex() for interned strings. - I didn't completely get why did you change the "key" operand type from IS_TMP_VAR to IS_VAR and how it affects performance As I understood now you need to allocate new zval on each loop iteration even for foreach over plain arrays. :( Thanks. Dmitry. On Wed, Mar 6, 2013 at 7:27 PM, Nikita Popov wrote: > On Wed, Feb 27, 2013 at 8:33 PM, Nikita Popov > wrote: > > > Hi internals! > >interned strings > > I've opened the voting the the foreach-keys RFC: > > > > https://wiki.php.net/rfc/foreach-non-scalar-keys#vote > > > > The discussion for this RFC can be found here: > > http://markmail.org/message/rzoacqaesxbd67lu > > > > The RFC was accepted unanimously, with 21 votes in favor. I'll merge the > patch sometime soon. > > Thanks, > Nikita > --e89a8ff1c8aa70f83004d74442d4--