Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45289 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81573 invoked from network); 16 Aug 2009 21:25:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Aug 2009 21:25:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.215 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 209.85.220.215 mail-fx0-f215.google.com Received: from [209.85.220.215] ([209.85.220.215:42064] helo=mail-fx0-f215.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/60-13350-849788A4 for ; Sun, 16 Aug 2009 17:25:30 -0400 Received: by fxm11 with SMTP id 11so2158783fxm.15 for ; Sun, 16 Aug 2009 14:25:26 -0700 (PDT) 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 :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=N3KeFAdV7EJqdfYZ2VRjRDd66JCOl8MXImARwygTLhQ=; b=sB6h1pykadr0zuQl0KDDgrpmIwQ8vkWCXyXf/qcecY3apJsetdp/tm8a26aD3JtY9o SAyjh+wozF+1yrSdSKdqYSdfSzeqopjJLQxiRL7s446dpePBenNHNPjGTSXSfQUKG2c9 Pnay7b2C/DUAdUn8UDoNvWHkGIm6JaBlP1r00= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ZtmJmCQzxqrDqpTwSVWPwWxxvhmQJJzmHL+t1S9OXw/ewd/4iyhCpzJjlhhlzBzzHo yPw9l/phWb0IxMTn0vR7Ca+YUnGM3vRmS0l7R0Jnj0xgRGx3cpZfKIa8foQstLuZpQ7c zQRev4EIwliMy+Ltqf3gqqaOR62HdP2+54+do= MIME-Version: 1.0 Received: by 10.239.130.35 with SMTP id 35mr231208hbh.31.1250457926057; Sun, 16 Aug 2009 14:25:26 -0700 (PDT) In-Reply-To: <613920271.20090817005351@scriptolutions.com> References: <465610226.20090816150239@scriptolutions.com> <1035866081.20090816155804@scriptolutions.com> <613920271.20090817005351@scriptolutions.com> Date: Sun, 16 Aug 2009 22:25:06 +0100 Message-ID: To: Lothar Scholz Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Re[5]: [PHP-DEV] Design of the Zend Engine's Instruction Set From: paul.biggar@gmail.com (Paul Biggar) Hi Lothar, On Sun, Aug 16, 2009 at 6:53 PM, Lothar Scholz wrote: > PB> Yes, by many times. Part of that might be the expense of PHP's weak > PB> typing and references. > > No. Smalltalk, Javascript, Lua they all have the same problem with it No, I disagree. Javascript, Lua and Smalltalk are much simpler languages. None of them have references, which make many of the implementation techniques more complicated. The weak typing you find in Lua and Javascript are not as complex as in PHP. Lua has no variable-variables. And there is plenty going on behind the scenes that make improving the interpreter hard. Take a look at Section 2 of my optimizer paper to see some of the challenges (https://www.cs.tcd.ie/~pbiggar/#wip-optimizer) > and they solve it in much more clever and performant ways. Javascript Yes, they often do. But there is still a larger challenge with PHP. > with its class free OO is even harder and with V8 they have a much > much better solution. Its very difficult for an interpreter to take advantage of PHP's static class hierarchy. So its not much of an advantage. V8 is a JIT, so its unfair to compare it to a straightforward interpreter. JIT's have plenty of disadvantages, most of all portability - V8 runs on very few platforms. > It's just the implementation - not the language. In my opinion, its almost certainly both. I've argued that pretty strongly in my papers. > > This sucks so huge and is such a > fucking lazy argument of an incompetent language development team. It think its more the lack of a language implementation team. I don't think there is anybody spending significant time on making the PHP interpreter faster. > I've seen that you talked about branch prediction misses in your > paper. Did you ever tried to compile the original PHP with different > compilers, for example from intel or sun studio? Did you test or have > you ever heard of someone who tested the influence of the profiling > feedback that modern C compilers offer? (Well don't ask me - it's > somewhere on my TODO list - but i also haven't had the time yet). I tried FDO with gcc 4.4 on phc generated code, but not on the PHP interpreter. I've not looked at other compilers either. Paul -- Paul Biggar paul.biggar@gmail.com