Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83962 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78794 invoked from network); 27 Feb 2015 06:49:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 06:49:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.41 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-la0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:46066] helo=mail-la0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/61-32582-19310F45 for ; Fri, 27 Feb 2015 01:49:53 -0500 Received: by labge10 with SMTP id ge10so15592337lab.12 for ; Thu, 26 Feb 2015 22:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=CT33NiD7XP5zhB209sKdnn7tx62FOkEFp9MU5D7wnEs=; b=Isec5yOYmIAvZbLFBP/fW6A26f4xIEGPDvxFl6h7TP3PnNsUTRAjAOZo1rh3uF9mhR SEm0vQE1QCVGRe3R3FxlYajCMpMz0ARB8O7Bx3O5Fqb7pUMgW43BtjzCoQXDXpprA2Lu JSU2/9CHaHp+4u3OQuv3ZJsabdpEu4EgzbZT6NnB2X1SXWXzchFsxUuKjv2+SdnjZ2bF Is2JKUzsP0weVTLRvV6zpVuMUWmL0sCYhd3hGhSQh2ZMjuKts+eupMxlQCrFGJuRPjwI 1Cb0Y2NDaDFqtig0Zoz7wvoq87Df5tBA99o+oYa49jQKRoGS6vfhY4SJpuETGzcafCgM UN5g== X-Received: by 10.152.181.197 with SMTP id dy5mr1540243lac.57.1425019790338; Thu, 26 Feb 2015 22:49:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.28.198 with HTTP; Thu, 26 Feb 2015 22:49:30 -0800 (PST) In-Reply-To: References: Date: Fri, 27 Feb 2015 14:49:30 +0800 Message-ID: To: reeze Cc: PHP Internals , Dmitry Stogov , Bob Weinand Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: About optimization for compiler From: laruence@gmail.com (Xinchen Hui) Hey: On Fri, Feb 27, 2015 at 2:41 PM, reeze wrote: > 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. maybe you misunderstand , but let me declare it again. that's what I proposed.. keep opcodes honestly represents what php codes is... (stop doing optimization for compiler for now, and introduces APIs for optimizations, then do them outside of Zend) thanks > >> >> > >> > 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 -- Xinchen Hui @Laruence http://www.laruence.com/