Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83963 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80529 invoked from network); 27 Feb 2015 06:53:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 06:53:40 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.171 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.217.171 mail-lb0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:39633] helo=mail-lb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/C1-32582-27410F45 for ; Fri, 27 Feb 2015 01:53:39 -0500 Received: by lbvn10 with SMTP id n10so15428186lbv.6 for ; Thu, 26 Feb 2015 22:53:36 -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 :content-type; bh=B7gcujOK6xvwm7DY3el4iadyLd/gh2uZKcisF5ARmOw=; b=OgOpnhi6Vtddt7S3cuLahUIkvN9cSYkRy5LoarGH7pAd5BpZLfqsA9D6cVlrYGOiru AZy0tdedgUrbGW6ZH802LZP2MXQ4fnmYtk9tM86r8qe4RZfPDaXMJf3Ony/8p5QyZGpq Z79a3VYWpfZurRhtE4Av2cbPvDRWk1p9xubi/RIWwNH9wpApNoXgv/hW031cnQxyr/ma HbKXwFVYg1GR+qgnwSOfU/dXWGRu8l4roNYx7HWhmeOzFAifhQyeSQ/rPlAqJtvuDZC6 ldGDxB+KOPg8edapHBbio+LsmHYAixeeTxUTCSZrk1Uq6SbZO2wTok8WVubZk2O9Y6F6 VHIA== X-Received: by 10.112.173.133 with SMTP id bk5mr11017002lbc.94.1425020016317; Thu, 26 Feb 2015 22:53:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.28.198 with HTTP; Thu, 26 Feb 2015 22:53:16 -0800 (PST) In-Reply-To: References: Date: Fri, 27 Feb 2015 14:53:16 +0800 Message-ID: To: PHP Internals , Dmitry Stogov , Bob Weinand Content-Type: text/plain; charset=UTF-8 Subject: Re: About optimization for compiler From: laruence@gmail.com (Xinchen Hui) Hey: On Fri, Feb 27, 2015 at 2:22 PM, Xinchen Hui wrote: > Hey Internals: > > I was looking Bob's switch optimization.. And, I am not against this switch optimization.. I referring it to show where is my concerns came from thanks > > 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? > > thanks > > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ -- Xinchen Hui @Laruence http://www.laruence.com/