Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46682 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28585 invoked from network); 13 Jan 2010 12:40:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jan 2010 12:40:35 -0000 Authentication-Results: pb1.pair.com header.from=mathieu.suen@easyflirt.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mathieu.suen@easyflirt.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain easyflirt.com designates 91.199.255.56 as permitted sender) X-PHP-List-Original-Sender: mathieu.suen@easyflirt.com X-Host-Fingerprint: 91.199.255.56 python-06.easyrencontre.com Linux 2.6 Received: from [91.199.255.56] ([91.199.255.56:33648] helo=mail.easyflirt.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/DA-00773-24FBD4B4 for ; Wed, 13 Jan 2010 07:40:35 -0500 Received: from [192.168.0.51] (office.easyrencontre.com [78.155.152.6]) by mail.easyflirt.com (Postfix) with ESMTPSA id F331263752B; Wed, 13 Jan 2010 13:40:30 +0100 (CET) Message-ID: <4B4DBF40.5040801@easyflirt.com> Date: Wed, 13 Jan 2010 13:40:32 +0100 User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Sebastian Bergmann CC: internals@lists.php.net References: <4B4DABED.4060202@easyflirt.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] About optimization From: mathieu.suen@easyflirt.com ("mathieu.suen") Sebastian Bergmann wrote: > Am 13.01.2010 12:18, schrieb mathieu.suen: > >> I would like to know why the opcode is not optimized. >> > > Because any optimization, even very simple ones, impose a performance > penalty in the default execution model of PHP which does not use a > > bytecode cache. > For simple optimization I don't think so. Take the simple example: function foo() { $a = 45; return $a; } Here if you don't optimize you are creating a variable. So you put pressure on the gc and the memory. Best would be some benchmark. By the way why there is no native bytecode cache ? > Only when the bytecode is not regenerated for each execution does it > make sense to invest for time for the then one-time compilation. > > Sorry I don't understand what do you mean? -- Mathieu Suen