Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129373 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 468251A00BC for ; Fri, 21 Nov 2025 15:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763738563; bh=PlHIVx4qGz6HknKFhFU6D/ifzRN7XnAxmdsnx/kP49E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CljgcAyKslsggdqOGVtgqbpxg7Dc9PhnNCbZenGzGThmI67a4yi858Fm1OSGjqIGs VjeUOSZ1Zy5QEmsTeXSxQweYfkFlckk1kBY1HcVYV0562D3K6P3AzISDpACZ/TnKDh hhj+5EfKju2XlgemRwvGpGkTImJ4yOxajr+umMr2JLgaPWa8vzdajAUvADzszKv/Vd aiJ8f9kMSNCAjDNnFuPPcLokgSXrx/hOBbSgAMFAuYA7ZyFA40Wzt73Z7mz1uyzG3/ IydhnaKTvsdsusaPyeILlVMT2IxbCaOV/eNPFbkYyNNmcYdWBO9hyhzzHgZXUl6ENX AY3vMbjwSWU4w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EA3F3180636 for ; Fri, 21 Nov 2025 15:22:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 21 Nov 2025 15:22:42 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-641677916b5so3355240a12.0 for ; Fri, 21 Nov 2025 07:22:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763738556; x=1764343356; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PlHIVx4qGz6HknKFhFU6D/ifzRN7XnAxmdsnx/kP49E=; b=kAWoIjjhGeJGE7kLJksl0fNWxdApawjidZF0JZfB8krp0zENg4BsxtZL8kEUUkeLzf LRXBcvxXAXnxXJ8mQSq950g4DdntYknG95YIsi7M9AlGPIozySzXzr6NRqGnwYL13wkR qcbnSW1zYaWqOTd6iPJFEyeywNfpFqfMwmX7RWPS1y+v5oeFAJlVywGVR/uh0GhH2VzA euYrQ7MxK8qxBkqq05dlRZPKeJCHAWEN1+dwRDZ35sCW7Q8au62rjqAaY1xQIA+hh3SK mUfjx6wUWOosRT49hWyyfTOaLHobNEF955gSJJNs4ISBqljHUqxowDfueg+01/kGDjIX gEAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763738556; x=1764343356; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=PlHIVx4qGz6HknKFhFU6D/ifzRN7XnAxmdsnx/kP49E=; b=nCmitvTeWHzuk1sy96nNuyS7GQFmj34ARX5cUOeQMSNDCnm+mGtZSqbE/cmxb9KeVb D7NUici5uqdjvYlgTWOgVyjscFYSYwgVD5RhcXy3o73oYK/ps+4uBZIB7S7DrFOjP3R9 bEWnSqfCjGQSdYSnq7aRoZSZUrWw4ZubBwv3JskRb6/4XzJLFN1LIQk994T1IuNAOHkb G4lY1OlhrF/CWRJijOglTnlmeZ+6U+CUQI5x7VRQ38AJDDOmPmUgzehcf2Q/AsnN7TyC Po+m5H0WAh4702UveOXG3t45bSByGb9179VfUdcwnANnUZAmORZSew/dPdXs/9td7oZu 7b8w== X-Gm-Message-State: AOJu0YxMc0qcLtREufFO6qwE19QG3XLdHD/rTMqOH2C4snAfnhSgF/KQ ZWosn/k8Dd9KU5E6AQe0dc39Izcu90NnlZde+ApHW5S3EGBFUkdszQ8rlEODbM+3hK5HRDuUYfe smAgWXDcVXkgv1H8sgzdNlnx1CFxTVQILIzCJ X-Gm-Gg: ASbGncu61sRoBEsUZvwncy6PjROkLa45nvVIRLgxP1p9ODVI84JucJbP6m+/+gZBnqi Ruh0/Kj1fkYD0XXvOsaK9mnrkaA4Kl4mdwp2crEtfkOo3iydTKPrTEDgcK59xXnFlLC36zahRpC MK6A3z/R41NhEhp5zMZ0+R4mGHuPSzzazlIwR5oqjmTvYPWN9o8bNjd3XwC8MIHDRba1nLtXpgr dQToNx2NgI4oiJLC3cI3fymN03+xMSWIPopbsK8pxenZm0DmSslJbrRH+M/IEup1OFyKoA= X-Google-Smtp-Source: AGHT+IFWI4d5M5iGRXP6aLt0TQS4ULKpg/qCI0gW5BxPPa3moq9sbpUs4UlhiSguiPBZkSUd8v6ZhP22YGjTnwSCkDQ= X-Received: by 2002:a17:907:2d94:b0:b73:5a2f:2f0e with SMTP id a640c23a62f3a-b767150b83amr283318466b.3.1763738556273; Fri, 21 Nov 2025 07:22:36 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 21 Nov 2025 16:22:23 +0100 X-Gm-Features: AWmQ_bnOAPzjz2cJOgSp92GKdXd4-JHXHYG_hLyACwGFCtSCIw8sGl98mZ95DJw Message-ID: Subject: Re: [PHP-DEV] What's the status of the JIT? To: Brent Roose Cc: PHP Internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: arnaud.lb@gmail.com (Arnaud Le Blanc) Hi Brent, > I'm wondering about the state of PHP's JIT these days. I understand that = Dmitry is still working on his standalone JIT IR framework [1] that's being= used by PHP, and that Arnaud is maintaining it from the Foundation/PHP sid= e? In my own benchmarks, done in PHP 8.0 and PHP 8.4; I cannot seem to get = any meaningful performance gain from the JIT in web applications or in tool= s like PHPStan. [2][3][4] To be fair, the first web benchmark in [2] shows a 9% improvement with the tracing JIT enabled. But the benchmark seems very unstable: The second run gives a widely different number for the baseline, but I would expect that number to be very close to the first run. However I confirm that the JIT provides no improvements on PHPStan at all currently. > The question I'm left with is whether the JIT is worth the hassle? Assumi= ng the JIT's existence impacts the complexity of internal development, I wo= nder if it wouldn't be better to deprecate it in a future PHP version? To b= e clear, I'm assuming the JIT impacts internal development =E2=80=94 maybe = that's wrong? Perhaps I'm missing a real-life use case that benefits signif= icantly from the JIT as well? If performance is an important feature, then we need a JIT in the long term. Other VMs have shown that JITs can have spectacular performances in practice. The reason our JIT is not bringing much benefits yet is that it's still in a very early stage, especially on the frontend side. The alternative would be to rely entirely on interpreter improvements, but it's already state of the art, and we are way past the point of diminishing returns: it's unlikely that we can make as much improvements with the interpreter alone than with a JIT. Also it's likely that work on the JIT has a better cost/benefit ratio at this point. Regarding the impact of the JIT on internal development, I believe that it's relatively low: * The JIT is known to be a bit unstable yet, and there are occasional JIT bug reports, but these affect only the JIT and deployments with JIT enabled * Changes to the VM are likely to require changes to the JIT as well, but this is not the majority of the work * Language changes, such as those proposed in RFCs, often require JIT changes as well. But RFCs are not required to implement JIT changes before voting, so this only adds overhead on accepted RFCs. This represents a very small fraction of the work required on an RFC. * Other changes don't usually need to care about the JIT Best Regards, Arnaud