Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36143 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6046 invoked from network); 14 Mar 2008 16:51:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2008 16:51:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:4806] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/03-09575-A2DAAD74 for ; Fri, 14 Mar 2008 11:51:56 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 14 Mar 2008 18:52:13 +0200 Received: from [192.168.16.115] ([192.168.16.115]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 14 Mar 2008 09:52:10 -0700 Message-ID: <47DAAD25.4000507@zend.com> Date: Fri, 14 Mar 2008 09:51:49 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Marcus Boerger CC: Dmitry Stogov , Andi Gutmans , phpxcache , internals@lists.php.net References: <06B0D32C7A96544490D18AF653D6BDE5026BA3C7@il-ex1.zend.net> <3210620415.20080314173251@marcus-boerger.de> In-Reply-To: <3210620415.20080314173251@marcus-boerger.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Mar 2008 16:52:10.0339 (UTC) FILETIME=[BEB8D330:01C885F3] Subject: Re: [PHP-DEV] Patch for opcode caches From: stas@zend.com (Stanislav Malyshev) > But that means we are compiling inheritance when a file is loaded form > the cache. The goal should be to compiling inheritance when writing to > the opcode cache file. All we achieve here is a slow down. If there is You can not do that. You do not know that until runtime. > something that makes this required than at least we need to warn the user > about the slow code. I Think what we need to do is deprecating class and It won't be slow. It would be much faster (in some cases 10x faster). This specific assembly of instructions might be slower in some cases, but the code altogether will be faster. That's the idea of the opcode caches. > namespace use in non main blocks as well as include and require in non > main blocks. And if there is no such case than everything can be bound > early which is the fast state we should aim for. We do not need to deprecate anything, and inheritance can not be bound before parent class is known, which in the case of bytecode cache means - not before the file is loaded from the cache. That's exactly what this patch enables. It does not change performance characteristics of neither cached not non-cached code, it just makes it much simpler and working in all cases. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com