Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58957 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82758 invoked from network); 15 Mar 2012 14:21:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2012 14:21:24 -0000 Authentication-Results: pb1.pair.com header.from=klaussilveira@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=klaussilveira@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: klaussilveira@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:48193] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/20-15833-3EAF16F4 for ; Thu, 15 Mar 2012 09:21:23 -0500 Received: by lahl5 with SMTP id l5so2697197lah.29 for ; Thu, 15 Mar 2012 07:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=vsl+YfIjwrUm87j0RYVuLK7KyRIaom9vraHTWrRDDTo=; b=JOW2kGKNqBA2XnNUpxjOpaSQOEa+tiWSfXuKe/zIrrRV318a5i46RYuL8ik3xX2WUX DXnvk0/Dy2d3JF6kMWhAGCSHMcxZwInTHDe3UfecYZmq6ZY0MeDCKMlkw1Xw2sa/DH22 nMPyK2p+Xm9dxF1wf/0KrnqU9j4w7W/iFNvtVHZUHBd2QXz6WRHGJKijMzQseAt/kfbJ seR8HLxn4FHBouUnIrAIJB1/sDNwmVDJzWKSqRy8yWE0D0tARzCBWkDqF9JKUye5/Y+1 xHiMu2/6aw7Y22NvJPdZ6IDyklnuTCbAmK0EgbhuyB5CvoeDDt5Tr7O0Pmio96lmZ6gV d2/A== MIME-Version: 1.0 Received: by 10.112.17.163 with SMTP id p3mr2618086lbd.35.1331821279248; Thu, 15 Mar 2012 07:21:19 -0700 (PDT) Sender: klaussilveira@gmail.com Received: by 10.112.46.98 with HTTP; Thu, 15 Mar 2012 07:21:19 -0700 (PDT) Date: Thu, 15 Mar 2012 11:21:19 -0300 X-Google-Sender-Auth: 0IsOwFWg1mQkRI44OtbHgHijPbQ Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=bcaec55401a641025f04bb48ce9f Subject: Small question about performance From: klaussilveira@php.net (Klaus Silveira) --bcaec55401a641025f04bb48ce9f Content-Type: text/plain; charset=ISO-8859-1 Hello internals, I've been involved in a discussion at the PHP Standards Group and we recently had the following statement: *Say you had a loop, and inside that loop you wanted to modify a param > **update the key:** > **foreach($a as $key => $val) { > ** $a[$key] = someLong(functionCalls(hereThat($spanOver85Chars))); > **}** > **If this exceeded the line width, you would have to split things like > **this over a few lines, storing the val temporarily in a zval's until > **you reached your end computation. Therefore allocating more memory > **iteratively. * I'm curious about this. Can anyone confirm it or a benchmark should be made? --bcaec55401a641025f04bb48ce9f--