Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79899 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93796 invoked from network); 23 Dec 2014 22:40:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Dec 2014 22:40:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:44813] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/F4-01814-C6FE9945 for ; Tue, 23 Dec 2014 17:40:46 -0500 Received: by mail-ob0-f173.google.com with SMTP id uy5so27328761obc.4 for ; Tue, 23 Dec 2014 14:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Vndy69WAxnYy5oigC2MlusSDmXBp7DQOreNJzdENPtE=; b=Z8BQyMHf64KE1gDG0XP3SVDbwRISTHylO574xMHjOL0YnThPEK6gzNBchYSoyiBYlT pJt+KYkzzTZmf3P9rrOVhlY51FNUuM7JunxsULH3iifLfeFRKQzGL8baYGnrIW/WGlYc bZ0y0N+QkWE7RsZ+KBMYNSyHcQBbCe/NAEotLCPZR+0wpEf9uRrv4vjpKo++RdQRPP2H 2EFJoEiULi6rJ6U6Z2f/y29QfOQJY1uBHAwdVWKcoEdLK8FNtduDOyjIhdjz0HiEtloM Oai4ATqRLh75hKeH/rFt1vWz1FJJ7tX/YPCC8vtv65B8NSgQV9DvSsouTdmXCrQYqa/4 nXHQ== X-Received: by 10.202.173.198 with SMTP id w189mr16800831oie.27.1419374441901; Tue, 23 Dec 2014 14:40:41 -0800 (PST) Received: from [192.168.2.145] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id ib6sm8039105obb.10.2014.12.23.14.40.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 14:40:41 -0800 (PST) Message-ID: <5499EF68.9050509@gmail.com> Date: Tue, 23 Dec 2014 14:40:40 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Jacob Bednarz , Nikita Popov CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Line profiler for PHP From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > By this I mean I have looked at implementing it a couple of different ways > and each time I get caught up on timing code that spans multiple lines such > as: > > $array = array( > 'my_key' => 'my_value', > ); I would ignore that if I were you and use whatever lines the engine assigns to specific opcodes. There's nothing you can optimize between array( and 'my_key', so for all practical purposes it does not really matter to which line of these the code is assigned. -- Stas Malyshev smalyshev@gmail.com