Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65459 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95772 invoked from network); 30 Jan 2013 00:54:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2013 00:54:57 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.128.176 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.128.176 mail-ve0-f176.google.com Received: from [209.85.128.176] ([209.85.128.176:36987] helo=mail-ve0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/75-10721-06F68015 for ; Tue, 29 Jan 2013 19:54:57 -0500 Received: by mail-ve0-f176.google.com with SMTP id jz10so746850veb.7 for ; Tue, 29 Jan 2013 16:54:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=s+H8UNltcn1wInXSjZXnQ7F4K8WM44FvAMLDNJVWxUg=; b=YzoTNx45h3cXbe+DGp0JmcP9JbWNd3iBcqnveYnlaacLhyv8bMYz1bLVxNr+Tmd2ev ZBOzh7hxC1FX652OrjyNw/jV8MbRnsknTsKHpsqEK6Z5ZD2sI33gwQt5ZCpFBe72+3xd DzUGFmiEGygXk6xDPObMUss5uabyudevW2aUag7EzABlGKz6U/mv+Hl0u1GM4vwGqh3W P834qb9lClRJbHstv+t8FinSiPN+VprEVPB+9VvH4WCVrCGX8uOJOa0jUWNbsVFoE1bR pJn4orW1IHIoHeBHRvr2g6uKM2+PuUblBh3Rb74l7hT706+QN0+DmOX8wc9+eY8vv/83 hgMg== X-Received: by 10.52.17.135 with SMTP id o7mr2820571vdd.70.1359507292794; Tue, 29 Jan 2013 16:54:52 -0800 (PST) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id z20sm9941673vds.12.2013.01.29.16.54.50 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 16:54:51 -0800 (PST) Message-ID: <51086F59.6030007@lerdorf.com> Date: Tue, 29 Jan 2013 16:54:49 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Stas Malyshev CC: Christopher Jones , Zeev Suraski , "internals@lists.php.net" References: <5d21b42656d49b4a71d9f808541bd745@mail.gmail.com> <51078485.30107@rotorised.com> <11e1ccc6eca996d9d94ae9a3bff0bbab@mail.gmail.com> <5108667C.1030901@oracle.com> <510868DE.7010408@lerdorf.com> <51086DB0.8050706@sugarcrm.com> In-Reply-To: <51086DB0.8050706@sugarcrm.com> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlbmEJh4XyXcTJSn4RLawSDPmF3+4vyt9Me+hPA4lsZ4KHUeTBIeNjD8JfPj4HYVg1PuhGO Subject: Re: [PHP-DEV] [RFC] Integrating Zend Optimizer+ into the PHP distribution From: rasmus@lerdorf.com (Rasmus Lerdorf) On 01/29/2013 04:47 PM, Stas Malyshev wrote: > Hi! > >> which shows the dreaded zend_optimizerplus.inherited_hack which mimics >> APC's autofilter hack. I'd love to get rid of this particular bit of >> confusion/code complexity on the integration. > > Ohh, this one. IIRC that has to do with conditional definition of > classes and the fact that script may be compiled in one environment but > loaded in another, which may create difference in class tables, > especially combined with early binding for inherited classes. Getting > rid of it is not that easy until people stop writing code like: > if($foo) return; > class Foo extends Bar {} > which would work differently depending on if Bar is defined or not. Yes, I am quite familiar with it since we had to handle this in APC too. But I don't think getting rid of it is that hard. It obviously can't be done in the opcode cache because by the time the compiler hands us the op_array we have already lost the FETCH_CLASS opcode which we may or may not need. We need to look at whether that MAKE_NOP() call in the compiler is actually a worthwhile optimization in a future where most people will be running an opcode cache by default. This is one of the prime examples of making the compiler more opcode cache friendly. Yes, it may be at the slight expense of non-opcode cache performance, but with a bundled opcode cache implementation that should be less of a worry. -Rasmus