Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46875 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57323 invoked from network); 23 Jan 2010 20:26:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2010 20:26:30 -0000 Authentication-Results: pb1.pair.com header.from=iamstever@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=iamstever@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.44 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: iamstever@gmail.com X-Host-Fingerprint: 209.85.160.44 mail-pw0-f44.google.com Received: from [209.85.160.44] ([209.85.160.44:50435] helo=mail-pw0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/D0-52645-57B5B5B4 for ; Sat, 23 Jan 2010 15:26:30 -0500 Received: by pwi15 with SMTP id 15so1637864pwi.23 for ; Sat, 23 Jan 2010 12:26:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=9JHBb5HKgyPzk3eqcNyLVcFquENsGQKX/yrsryDE3JU=; b=SxgF71oXr/O5XLnrHjH0pZj4SUGCMtdbKaY5XVPB6IXCxtDXybaxxtzquFXhYRunMQ pM9Ux9EJUB6oF2ZsCeOIjTYfEIQmYajyNXJ+xQ/qFvV6ZBvRqI2+rCpnYMCEmcVqeYwI RpRoz3vcLybUt00pTLov9liW/ePN7uhlMcZ1Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=x50SIEzSh3w8xhqsY6iUL/1OMma7fGBF1k1CFj7cdK83m0hhSumzI6Qm6ajI4ycfD2 AJR1VH/2jGk72pN2RkRr64o6gi/H3qJtFtezEXyTaAOTpPZ8JKqPEiebhQNJKzSXf1+6 /JUq0Hxn0YRGC8YW7KSJDGJK9hdy/g8NDB0tI= MIME-Version: 1.0 Received: by 10.115.85.15 with SMTP id n15mr3155250wal.172.1264278386492; Sat, 23 Jan 2010 12:26:26 -0800 (PST) In-Reply-To: <4B5A75B4.1080403@wikimedia.org> References: <4B4DABED.4060202@easyflirt.com> <4B4DFBDE.1020906@lerdorf.com> <4B4E5943.3000706@wikimedia.org> <4B4E5D5B.9020805@zend.com> <4B4E6BE5.1070404@wikimedia.org> <4B4E79A6.2010904@zend.com> <4B4E8D15.60508@wikimedia.org> <57792e851001212136h12d7effaldeb75869808d8350@mail.gmail.com> <57792e851001221857m7954ee3ag4485d5cd695b6126@mail.gmail.com> <4B5A75B4.1080403@wikimedia.org> Date: Sat, 23 Jan 2010 12:26:26 -0800 Message-ID: <57792e851001231226j5f7e6552s16a7a5aa80e8ea2e@mail.gmail.com> To: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] About optimization From: iamstever@gmail.com (steve) >> I doubt anyone does I1/D1/L2 cache profiling for PHP. > > I did a little bit of CPU cache profiling of PHP using oprofile, more > out of curiosity than anything. It was a couple of years ago now. > > http://wikitech.wikimedia.org/view/Oprofile > > But you don't need oprofile, you can make changes based on theory, and > then measure the execution time of the result. I don't know where to go with that. I so much agree. Yet it so much depends on what the theory is based on. But measurement and a decent test matrix is key. valgrind/callgrind and the others can help. Honestly, I think people should stay out of coding languages (either interpreters or compilers, where interpreters are the more complex case often best made easier by doing JIT) unless they have done CPU design. It is not like the pre-386 days. These days CPUs are designed for the compilers (either where they are, or likely where they will be). The CPU designer decides how the compiler should operate. It is their theories that matter. Not always -- just like in literature -- the author may create something that is beyond their own grasp and best understood by others. >> PHP doesn't ship with an optimizer, byte code cache, or JIT. > > But community members are developing those things nonetheless. > eAccelerator has an optimizer, there are several so-called byte code > caches, and Roadsend is a promising compiler project. Have been developing for a more than a decade... PHP4 was the last time there was real performance improvements in PHP itself. The fact that there are "several so-called byte code caches" does not equal a good thing. It means that PHP is broken and lots of people are trying to fix it. It also means that none have succeeded, as that would mean that one of them would be included in the PHP core by now. >> Rasmus had the idea that it should >> do simple things and be easy, and if you were going to do anything >> else, then you should have the money to do so. Fair enough really. > > Rasmus is not the whole community. Like a founder of a company that sets the corporate culture, don't count Rasmus out so easily. Founders earn such power. Until they are booted. It is not going to, nor should it, happen here. The guys at Zend muscled in to change the culture as well, and have succeeded to a large degree, pushing PHP into the enterprise by offering a "full" version of PHP, not free of course. And thus the reason for not having a byte code cache in the core. And the whole "optimizer" which was their decoder part of their encoder project was just making bad karma. Enough time has passed for a new round to wrestle control. We'll see how the FBJIT goes. Which just goes to show, if you really want something done, put some muscle into, take over or fork. Or keep to yourself.