Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84183 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75468 invoked from network); 2 Mar 2015 20:33:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2015 20:33:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.45 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.45 mail-qa0-f45.google.com Received: from [209.85.216.45] ([209.85.216.45:61411] helo=mail-qa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/4A-14834-909C4F45 for ; Mon, 02 Mar 2015 15:33:14 -0500 Received: by mail-qa0-f45.google.com with SMTP id j7so24864947qaq.4 for ; Mon, 02 Mar 2015 12:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IpTh1/7Fylrp9hdgFkl869Eq0xtygnGKeTXH5NV12o0=; b=KiofKyKoNHZ6p528xRUePy09HG76wJtJ9l/qXXvPQUhZCDAbzqUB6O2+ZkLu18pwr0 FL/0hLaY1jjEJqOM0SKY84gim5Sk65OhvkLMfAkaA+r0BIKmDZaVYqMmUkWcPJnlOKeS KQqTaIQX4eVp1qHBhYHgjqtackrcEXZpzCFAXG1S9tfDRAt1zp40mCSmkZUyF55tc2vs ILqWjjalOcD8W6ddGkUjGNQpbDAeQwLGdj/yBGfpYgj0HlmNc1ITQ+oxmhJI3HeBnvKF sCUyNjIh/3QGc5jZF+Bxs91xf03WTEZ6VMyQYOYujNq+kCxw+DbxEsMIsAhnq9RbOwI9 G9zA== MIME-Version: 1.0 X-Received: by 10.229.207.198 with SMTP id fz6mr46869374qcb.27.1425328391200; Mon, 02 Mar 2015 12:33:11 -0800 (PST) Received: by 10.96.39.195 with HTTP; Mon, 2 Mar 2015 12:33:11 -0800 (PST) Received: by 10.96.39.195 with HTTP; Mon, 2 Mar 2015 12:33:11 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Mar 2015 12:33:11 -0800 Message-ID: To: =?UTF-8?B?5oOg5paw5a64?= Cc: Bob Weinand , Dmitry Stogov , PHP Internals Content-Type: multipart/alternative; boundary=089e0122eb9c724be40510542039 Subject: Re: [PHP-DEV] About optimization for compiler From: pierre.php@gmail.com (Pierre Joye) --089e0122eb9c724be40510542039 Content-Type: text/plain; charset=UTF-8 On Feb 27, 2015 5:23 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 > 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? As it sounds appealing, I am not a big fan of creating different scenarios from a core perspective. It will make the testing and maintenance harder, by introducing extra possible bugs. If I am not mistaken, it was planed to have to integrate opcache in the engine, making it part of it instead than a still optional extension. That would be a better way and may open new possibilities. --089e0122eb9c724be40510542039--