Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83960 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75762 invoked from network); 27 Feb 2015 06:41:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 06:41:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=reeze.xia@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=reeze.xia@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.182 as permitted sender) X-PHP-List-Original-Sender: reeze.xia@gmail.com X-Host-Fingerprint: 74.125.82.182 mail-we0-f182.google.com Received: from [74.125.82.182] ([74.125.82.182:34678] helo=mail-we0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/B0-32582-CA110F45 for ; Fri, 27 Feb 2015 01:41:49 -0500 Received: by wesq59 with SMTP id q59so17684997wes.1 for ; Thu, 26 Feb 2015 22:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=k/AM7ReJoASFRH+Bc4kxRlKhYirIHSsKi12p83Eqoac=; b=JkKj7Em9fUH8RqH6QK4PuuXnRy/5crj9QKYC1J+OjYWuDtL/f+sohLrLkXH5ovyAm9 whf5Maw3+tjFk6WyR3uyVAw5v19QXFr2JNGF128VwCNfdM986UeVcB2baiSCu9Uad0uk +yWeiaQt4zJ6q1uvZOsTuPGRW4a8r/mOfpapqXxoSW8eNVarIb7+tIqJVV8iNPEqevHn OQx+1uk5qgI3um0s2Hfexav7sUCYnL4JVN4ZLN9ft1pWxevkwcI+b/F2nDDO3US3/GFW VE5hYHXo+xaRN6bHhe7PVbiGuE+H0K7x20aisgMUx2TWawYj/k5JnuMOb8JCZ5uw+Jxj aqUA== X-Received: by 10.180.108.177 with SMTP id hl17mr3228762wib.35.1425019306093; Thu, 26 Feb 2015 22:41:46 -0800 (PST) MIME-Version: 1.0 Sender: reeze.xia@gmail.com Received: by 10.194.193.5 with HTTP; Thu, 26 Feb 2015 22:41:25 -0800 (PST) In-Reply-To: References: Date: Fri, 27 Feb 2015 14:41:25 +0800 X-Google-Sender-Auth: Gpql8n50a3CAABnvXUEjs4iUZew Message-ID: To: Xinchen Hui Cc: PHP Internals , Dmitry Stogov , Bob Weinand Content-Type: multipart/alternative; boundary=e89a8f3ba43b89b35a05100c29b6 Subject: Re: [PHP-DEV] Re: About optimization for compiler From: reeze@php.net (reeze) --e89a8f3ba43b89b35a05100c29b6 Content-Type: text/plain; charset=ISO-8859-1 Hi, On 27 February 2015 at 14:26, Xinchen Hui wrote: > Hey: > > On Fri, Feb 27, 2015 at 2:22 PM, Xinchen Hui wrote: > > Hey Internals: > > > > I was looking Bob's switch optimization.. > > > > then I start to worry about where is the place optimization should > goes.. > > > > in generally, PHP is a interpreted language. IMO, it should > > compiler the PHP codes to opcode without any optimization(of course, > > we did some, but they won't change a lots of opcodes which should be > > generated).. > > > > and, since 5.5, we already have opcache bundled in.. > > > > thus, I am proposing a principle, that is: > > > > in the future, we only do optimization in opcache side, and keep > or maybe big optimization? but I don't know how to define "big" or > "small" optimizations now.. > > (small is the optimizations, we are sure it is safe, maybe) > > thanks > > Zend Compiler without any optimization... considering Zend Compiler do > > things in -O0. > > > > since, optimization always are dangerous.. if we only do them in > > opcache, user can still run them codes with disable opcache, or at > > least disable some optimization level which cause that.. > > > > what do you think? > We may need to clarify which kind of optimizations we want to set a principle. There are different level's optimizations. Opcache is a opcode to opcode optimizer, but some optimizations might need lower level optimizations like Bob's, some might need to change base data structure. We have AST intermediate represent structure, there might be some AST level optimizations, this not opcache's job too. > > > > thanks > > > > -- > > Xinchen Hui > > @Laruence > > http://www.laruence.com/ > > > > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Reeze Xia http://reeze.cn --e89a8f3ba43b89b35a05100c29b6--