Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1848962rwr; Thu, 20 Apr 2023 23:58:17 -0700 (PDT) X-Google-Smtp-Source: AKy350bwcPXIea3tbM/gRIeVpwDVQIcSpvfzk7Ko/hwFAGWSp0CgrNptrhgdl+R81+16jyxLgKaI X-Received: by 2002:a05:6a00:1505:b0:63d:45f3:9fc with SMTP id q5-20020a056a00150500b0063d45f309fcmr4721227pfu.5.1682060296780; Thu, 20 Apr 2023 23:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682060296; cv=none; d=google.com; s=arc-20160816; b=kNfM8HZwwPuoqkllX68642RKkUXu/3TkLBOXwSZJYfqBtoIAMlmd4aFOkpNCF1t+GL tJoH5eKW93trRC6WQzZWwiLQRrknhHdfFOTgzjkOWaGlIO5B+wEJp4PjOIzzdufGADxX hIpaKmS5vwEznYBb99pH13OkQ7NE+cV32GtKuGig//BwUGTG3vLbWVM031ctp5caZtKH KCgEeTipJ9UYJ9UiWoLCOGDare6nYrrqoLnzUM762IjCt+TBlL6L9nmNAat0YsZFbTsv za6IzGQoBRsW36jFVWEsF8+TxXt50OQsKqW/poRDWlOMOM4+E9RDnL8VJUDI52qZipbz u1iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=U73AEs8cQicyoxxcQc8RRY0OlwrH7ZfCZ4jcl3SpYak=; b=On2Rh05U7NpEDNBC22zwidjPHZMuY2rwYyO+HeOK+/fYHLNIrsnsaIGD4ThRn2qSDg HbVitQ4pXL14We49elJqo0d29VNndU7alAkL2gf07dJB6d8/bcw1Jv5aqN+Ui+0C2M6Z HRy+6wWCC/RorMFFLNEOcm7oOzwvS253U2zkUusvOuiKj6+yxW8Ua7ZaAuMPss0iraIR WSwZW2ryhy8NEh3U8tSeL85zhyQD/G5ok3n3BIunwbK/DsxE+IhObxp1Togk0f+rUMUJ wIYVuzBHGWe2kzcEhfw2/Ouad3MWOO9KO4fN3SehMYb8Ki4oVxDJiee4oyOu9k3lBihV 5qcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z28-20020aa7959c000000b0063b7acc199bsi1669378pfj.65.2023.04.20.23.58.04; Thu, 20 Apr 2023 23:58:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230037AbjDUGex (ORCPT + 99 others); Fri, 21 Apr 2023 02:34:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjDUGev (ORCPT ); Fri, 21 Apr 2023 02:34:51 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 83702270D for ; Thu, 20 Apr 2023 23:34:50 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 33L6YlHa012564; Fri, 21 Apr 2023 08:34:47 +0200 Date: Fri, 21 Apr 2023 08:34:47 +0200 From: Willy Tarreau To: Bagas Sanjaya Cc: =?iso-8859-1?Q?Andr=E9?= Coelho , linux-kernel@vger.kernel.org Subject: Re: strings Message-ID: References: <8de1912e-8009-3c85-ece5-7ca7f03be42a@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [dropped innocents from the CC list] On Fri, Apr 21, 2023 at 11:20:58AM +0700, Bagas Sanjaya wrote: > On Thu, Apr 20, 2023 at 03:58:47AM +0100, Andr? Coelho wrote: > > greeting...if youre interessed in string algorihtm check > > > > https://andrealbergaria.github.io/ > > > > Looks like above link is about hex arithmetic implemented using strings, > right? It looks more like a reinvention of the classical multi-byte string processing (memcmp, memcpy, memmove etc). > Also, on what use cases can your idea fit the kernel context? Or doesn't the > kernel already have the implementation yet? Sure it does, look at __crypto_memneq() for example, or more generally at any memcmp() or memcpy() implementation from the last 30 years, for example in glibc. Regards, Willy