Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104459 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80498 invoked from network); 18 Feb 2019 19:19:51 -0000 Received: from unknown (HELO mail-qt1-f196.google.com) (209.85.160.196) by pb1.pair.com with SMTP; 18 Feb 2019 19:19:51 -0000 Received: by mail-qt1-f196.google.com with SMTP id v10so19714991qtp.8 for ; Mon, 18 Feb 2019 08:04:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ye+JRIO/6Yg6oS25Xo73PLz2PnKu3hIj/EQ2Fyv5+KE=; b=ErhKYebtrT9d5YekTjPF61dhVtmiDJ1bsh34LFAYm52eVRcw0XYcGAFXosfp2JQ7ik QFg/vBfsrtOjgBKikgNOtXrdxoAujiGF1QCT6u7k+aQ6ltrFjftHHOrA5WSjNOFWndBX tAtLF6nEwwgarCBBCL5tLeMSZk5XD+1uVgNtaKUyAlVzHfjku+NVvZS1SfGEhNqphW3R BCzDQpEFjK0VDA3qXcf5RAzi+TsPTRu2LX7dXbKLb1d74XwsvHGrpBJHwqoB5kCvKJdJ /JQWb1xaFagYff8py5Fsq4eRCyLVEtGVFR7ogzwQ7sbJXVQLLCRTR/dnLLDKDEMfk2xF wb/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ye+JRIO/6Yg6oS25Xo73PLz2PnKu3hIj/EQ2Fyv5+KE=; b=dnOTvdyj9Aya/RRCoNAIuTqk8D7wfiOcxzZIUqq2wqehI6+xNnygBGomxYrXM6PtIP jsLPHMyFhOOKf0C1G2wh8E0p6D3EjQA3uDDfxAxlpQr6sEJPYinyEqoW6A+U9ngIhDPE KH8W6HwWwGSH8eWzGoH8jdgJPmdjNZiuyZiFzWXjgu55MbdLqWK90lwZd53Du4Id1qQ2 OyR9YKJlo9Ig0Bhzt43IRb3KAYI7LEhb0EWgKasqc8wpFnoG2YbXYCiVWEPiRRn/UeU5 0aRr63Z05h8sl0Toq4zr9ax46zyxJBjMf7LrdYMYyEH0JMGExfsHyMEb/5katCdGm4i8 Qg0A== X-Gm-Message-State: AHQUAua8JjgKqL73gozJspiciadEQA+1lsMhkm5Xgldy2w/MIkhvvt73 bxncGbTRonk9IJY6jEtvaKtmAqMgQ82elUBB6K3Vnw== X-Google-Smtp-Source: AHgI3IaeNkeeuYBljsNGASxIoqXrzSlTVF/d6H4eKiCdnrBoro5j4vhkF4uxxFCCOP5X156PDa/r6F33YJvx2EGGsxY= X-Received: by 2002:ac8:604:: with SMTP id d4mr17180004qth.71.1550505856119; Mon, 18 Feb 2019 08:04:16 -0800 (PST) MIME-Version: 1.0 References: <866a9262-4f49-fa20-e9d2-dcf2f4b0d320@zend.com> <6fda2b56-b99d-d383-af4d-24280767096e@zend.com> <97e258b8-6a88-f9fa-0489-7f34455e9dfb@zend.com> In-Reply-To: Date: Mon, 18 Feb 2019 17:04:08 +0100 Message-ID: To: Dmitry Stogov Cc: Eugene Leonovich , Bruce Weirdan , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="000000000000c6c78805822d467a" Subject: Re: [PHP-DEV] [RFC] JIT From: rasmus@mindplay.dk (Rasmus Schultz) --000000000000c6c78805822d467a Content-Type: text/plain; charset="UTF-8" > 1.3-1.5 times speed-up Dare I ask. But is this even worth while? This does not bring PHP to the level of performance where you could reasonably implement, say, interpolated image resampling or a JPEG decoder/encoder, correct? This is still orders of magnitude slower than C, am I wrong? Please don't think that I'm trying to shit on anybody's hard work, and forgive me for asking, but how much maintenance overhead does the JIT add to the language going forward? Will this significantly slow down the development of every new language feature? If not, then by all means, please continue :-) But if this is adding substantial maintenance overhead or significantly increasing the barrier for contributions, I'd say, think very carefully about this. Developers are not picking a dynamic scripting language for the excellent performance, unless we're talking near-C level performance (e.g. Lua-JIT and, to my knowledge, not much else) and I don't get the impression this is anywhere in that neighborhood? Again, really not trying to bring down this very impressive piece of work - but, as with any new language feature, we need to weigh complexity against benefits, and I'm not convinced this kind of speed-up really opens PHP to any new use-cases? Being faster is always nice, but unless it's actually "fast", by which I mean "fast enough to enable doing something new", it's only nice - it's not necessarily a must. For example, if this doesn't rival the performance of, say, WASM, integration of a WASM engine might be a more worth while pursuit in the long term. Just wondering. Please try not to see this post as aggressive or negative - I just hope we're entering into such a major language change with eyes open? :-) Thanks. On Thu, Feb 14, 2019 at 7:45 AM Dmitry Stogov wrote: > > > On 2/14/19 3:02 AM, Eugene Leonovich wrote: > > On Tue, Feb 5, 2019 at 6:06 PM Bruce Weirdan > > wrote: > > > > On Tue, Feb 5, 2019 at 8:38 AM Dmitry Stogov > > wrote: > > > > PHP+optimizer (-dopcache.jit_buffer_size=0): 32.29s (100%) > > > > PHP+optimizer+JIT (-dopcache.jit_buffer_size=50000000): 30.72s > > (95.1%) > > > > PHP+optimizer+minimalJIT (-dopcache.jit_buffer_size=50000000 > > > > -dopcache.jit=1201): 29.95s (92.7%) > > > > > > It may be interesting to try -dopcache.jit=1235. It should JIT > > only hot > > > functions and requires some warm-up. > > > > For this use case 1201 was the fastest of all the options I tried > > (including 1235). > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > Here are my results of benchmarking rybakit/msgpack.php: > > > > bench.php, w/o jit: > > Total 9.8220 4.3121 > > > > bench.php, opcache.jit=1235 opcache.jit_buffer_size=256M: > > Total 8.7255 3.3350 > > > > bench2.php, w/o jit: > > pure msgpack: 2.2818 sec > > pure msgpack packed: 2.1717 sec > > > > bench2.php, opcache.jit=1235 opcache.jit_buffer_size=256M: > > pure msgpack: 1.5221 sec > > pure msgpack packed: 1.4739 sec > > > > Details: > https://gist.github.com/rybakit/bb551f962b706a9e08c995cf5ed9762f > > 1.3-1.5 times speed-up. > Thanks for benchmarking. > > Dmitry. > --000000000000c6c78805822d467a--