Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116140 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17094 invoked from network); 23 Sep 2021 04:59:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Sep 2021 04:59:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 712C51804C5 for ; Wed, 22 Sep 2021 22:40:30 -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=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (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, 22 Sep 2021 22:40:29 -0700 (PDT) Received: by mail-pj1-f54.google.com with SMTP id mv7-20020a17090b198700b0019c843e7233so4056568pjb.4 for ; Wed, 22 Sep 2021 22:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wikimedia.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=xR4GQtiU21PS/zb+Z/AEq4QGu+YBat1LT+L+0OEt7Xc=; b=DURwaHOwSQTO1CGAftzrINvENgfbzmOoBDUEtx4ZEQbYOFnguxKIg+JN/4JYUoZxlr 8jlpN1BKXw/koNRs4DaFAkf90aP8lVE+TP1kztQ0OhA9nTU+RIXhXT1G4zZru4U1zJgC 74fec4aeCRKf6Q0haFdNXKN1EEzU3m/Y5yggA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xR4GQtiU21PS/zb+Z/AEq4QGu+YBat1LT+L+0OEt7Xc=; b=GMp4opifMNJjpENMVRWr1XhcTJZgRy2DKf0wdjRUwBLpg8Qlms33YzzjsabPUuVopj L2oMBTiDDKFnSzwDqoNEG7jEJw7wloSABd5Crf+JFheFpIRU+RPr1mi+71qhCzqSNyCo S2+CkKaqdnhvYDF2mc4VNeE/rz4cyet5HheOC+niQW6fUi6p5S73UADLTHLJlg8CEfZI 6H8WjBTN/1yX9VS+DMVUUraMy4MjtmDE62Nw7X39/uSOSFMBfgyvQSCEWBT8hnFkPasB I2/cY59J3a2rJnpc5ii2OiMX4skO0mIU5WIE4sZOROFeSDz+K75cdD9MIFjLDfJNAZyk xCmg== X-Gm-Message-State: AOAM5304vBfWHPzpGA7LxUQ5xnqLQrC7K7oAX/hR/NJ+5K6/DgqHqYoZ tH8vk7Er9xAmeVaTP5HAZgASx6AWHBzODA== X-Google-Smtp-Source: ABdhPJyyQ6kLbZk/uYYAT70cVATFDgzRs680R5P4CR777CA8sirvLAnvv7XddKqaVsNq0+Q7b5Gyiw== X-Received: by 2002:a17:90a:352:: with SMTP id 18mr3316658pjf.116.1632375626786; Wed, 22 Sep 2021 22:40:26 -0700 (PDT) Received: from [10.1.1.45] (124-168-141-168.dyn.iinet.net.au. [124.168.141.168]) by smtp.gmail.com with ESMTPSA id t2sm7467443pje.5.2021.09.22.22.40.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 22:40:26 -0700 (PDT) To: tyson andre , "internals@lists.php.net" References: Message-ID: Date: Thu, 23 Sep 2021 15:40:22 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Make strtolower/strtoupper just do ASCII From: tstarling@wikimedia.org (Tim Starling) On 19/9/21 12:33 am, tyson andre wrote: > When implementing this, Zend/Optimizer/sccp.c has optimizations for functions such as str_contains, etc to optimize. > After removing locale dependence, those optimizations could be safely added for functions that would be locale independent as a result of your change. > - This would allow eliminating more dead code, and make code calling those functions (on constant arguments) faster by caching the resulting strings in opcache. I couldn't make this work. Even after setting opcache.optimization_level to 0x7FFFFFBF (pass 6 will not run unless pass 7 is disabled), zend_dfa_optimize_op_array() is called with call_map=NULL, so ct_eval_func_call() is never entered. I'll leave this change for someone who is able to test it (or for someone braver than me). -- Tim Starling