Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115338 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 42100 invoked from network); 7 Jul 2021 09:25:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Jul 2021 09:25:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B24F18033A for ; Wed, 7 Jul 2021 02:47:33 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 7 Jul 2021 02:47:32 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id f13so3023514lfh.6 for ; Wed, 07 Jul 2021 02:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZgaZw7nzGLH/6Fzs79Xflvs1JqyHqWgXBIfZQTxN6OY=; b=NVETd6divqd0zF2QKjbdpiqT+mqcVQ2SCjjK4cOuYGBbPfZ3CnBR7wze7QDNwPaNQX z46RJzK6Im1A6M2SAjO+ZJR1hZpvtNAYhIHs7Kbyw5Jj2dn33rWvNw3fY8brtym94tCt 5NFnQx2U0r05escgOn5rHw+AYPFUVqVkuft+U= 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=ZgaZw7nzGLH/6Fzs79Xflvs1JqyHqWgXBIfZQTxN6OY=; b=lTRuUNDqrrY+iDd2k1MbFvrbZqK3p+3rWWZvD8xnb8gAqeLwPr/X/24z6oTGOGMhsh haFTgGORqbdFX0AkRFnevt6IKB1SUTgYxW8a0dFAUvjPls4+c65lCt/7NIbhGIjRrZKZ hvvIhHTkprR8Bobb9fKZO59Nyi/Tktcg+nLnP0XVqf/YbUK2nzfaL1/dNoi1YsYTc8Di G8372L6jvBTeaoDEK3CtQFxAK0fviEFDpNdIHYbyMce5veAZxEviLSNoHcYDoFmuuDgB CvHcuMFsBsZ6mCIS+9MCnxC0NgJWNR3idWCA1whhaBdo7k10aMCsZPei+nTuBw8cSenL /7Cg== X-Gm-Message-State: AOAM531HyFqpBHDxz6r54+enc+rlJvoCixv/aGLx2bhUcmFVEyV49p9J xX312WoQtzSrFTzgwbL2+yA5/2REDYcapBcI7Nanr9UbLUhffq/d X-Google-Smtp-Source: ABdhPJxrxzdF1fNMDKP9JpD2/VzSDyMyUSycYah9/7Wp9OtjpcvvKdH0lYacFHPvgEPvhftiHbLMZ8w5JqgJLTLdQkk= X-Received: by 2002:ac2:5d2e:: with SMTP id i14mr17670187lfb.642.1625651250792; Wed, 07 Jul 2021 02:47:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 7 Jul 2021 10:47:19 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000551b7305c6856d92" Subject: Re: [PHP-DEV] [RFC] [VOTE] is_literal From: craig@craigfrancis.co.uk (Craig Francis) --000000000000551b7305c6856d92 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 7 Jul 2021 at 10:23 am, Nikita Popov wrote: > The RFC indicates that the impact is minor, but I believe those > measurements were made with the original version of the RFC, which did no= t > try to distinguish literal and non-literal interned strings Hi Nikita, The performance test results in the RFC are based on the latest version, updated on Monday (before the vote started), M=C3=A1t=C3=A9 Kocsis did thes= e tests independently to ensure there was no bias from me (my own tests were roughly the same). Joe Watkins would be better placed to explain the details of the implementation. We have always tried to keep the implementation as simple as possible, but there were concerns that certain optimisations by the compiler would make certain strings appear as literals, not in an unsafe way, but in a way that might be confusing to developers, with the examples being noted in the RFC: https://wiki.php.net/rfc/is_literal#compiler_optimisations Thanks, Craig --000000000000551b7305c6856d92--