Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116143 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24220 invoked from network); 23 Sep 2021 06:32:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Sep 2021 06:32:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E25B61804CF for ; Thu, 23 Sep 2021 00:13:50 -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-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 ; Thu, 23 Sep 2021 00:13:50 -0700 (PDT) Received: by mail-pj1-f52.google.com with SMTP id mv7-20020a17090b198700b0019c843e7233so4207064pjb.4 for ; Thu, 23 Sep 2021 00:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wikimedia.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gnMutvyYW26Yj+S5KjSJn/skFNcp+izYT+kumId+s0g=; b=Z8cxYy6o+5PZs7q2nZAWpH/LaJUIQ41uxg6LTcjzIL7G/DxnrmyI2kXiazZdTWJzaR mqetLOj1qgZhNnIa8ttHOQt7GILHH57lK11U0EtpsHR4rADekpZJVxmzJrfsgwmAQNeV MkbGH3phu/mO901La/moZeCUKsczBpW2AHD0E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gnMutvyYW26Yj+S5KjSJn/skFNcp+izYT+kumId+s0g=; b=Eb7dOeP2dQCm1ftDHZWVAFUWoUPueRZSHfAi7aYPUl/wdaEg/4M83uqGU3OWMQ4syc wM5XwT7tEAUuc49XGhZLbxQlBRPenndQ4VpYJzxMsbeIErKEXhbwuW9QGEJSRnzxdE4g imbg3Hs05MMINJIqJj1bkeTe2eynpeTVKj72GydlXL9Xw5WdOhUjIU5FwjcTpi8AUekl hzkE/PvCjIZWdZYmgK7XA9ngVqG6z+yol1SP5IfqxEGXFCz5CYuPxQ+fyDYonOvlR+7A cRV9HT+JOL35xmuq4IwI1UHY2vcIYLGvFN1Eau4WbewFApKwlWAe6tc+TWfC3WX4Y+rg U5VQ== X-Gm-Message-State: AOAM531kCIfg0fbVPQOQ157pWgLwPI19O+4qKpx6Q6hQbIFpHIxiTOxX RfzTpttOhaLgMSvxuSQpjXLy+e30Scn1/A== X-Google-Smtp-Source: ABdhPJyAmpw/SU/vjuBnL8T1NtuqH6ZX1fGbPDAJiq3HAOSGLMvCw7LeZi6na/XZfl3aL2d2X9ExIA== X-Received: by 2002:a17:90b:124c:: with SMTP id gx12mr3737556pjb.106.1632381229012; Thu, 23 Sep 2021 00:13:49 -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 w206sm4500971pfc.45.2021.09.23.00.13.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Sep 2021 00:13:48 -0700 (PDT) To: Pierre Joye Cc: PHP internals References: Message-ID: Date: Thu, 23 Sep 2021 17:13:45 +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] [RFC] Locale-independent case conversion From: tstarling@wikimedia.org (Tim Starling) On 23/9/21 4:53 pm, Pierre Joye wrote: > I wonder if either JIT could be used for the intrinsics support, > adding neon, sse[2-4.2] or avc256/512 (the latter would basically > allow most common strings to be converted in one go. > > If not, maybe split implementation however runtime cpu support would > be better. Many distributions built with SSE2 flags but are actually > ran on much recent CPUs, same for ARM (ie. graviton/neon f.e.). > Thoughts? SSE2 is already scary-fast. I benchmarked the SSE2 tolower code on my laptop: it was chewing through strings at 18 GiB/s, i.e. 50ps per byte. This was a benchmark written in C -- you would have a lot of trouble making a PHP tight loop in which SSE2 case conversion is the slow part. -- Tim Starling