From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#58168: string-lessp glitches and inconsistencies Date: Fri, 14 Oct 2022 16:39:55 +0200 Message-ID: <3C87B8E6-A52B-41B6-A959-954BBB5F788E@gmail.com> References: <7824372D-8002-4639-8AEE-E80A6D5FEFC6@gmail.com> <83czbef6le.fsf@gnu.org> <6CB805F6-89EE-4D7C-A398-F29698733A42@gmail.com> <83h70oce4k.fsf@gnu.org> <83tu4mais1.fsf@gnu.org> <83wn9gw2sp.fsf@gnu.org> <83wn9dp5xp.fsf@gnu.org> <83lepqlqdy.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22168"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58168@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 16:41:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojLsE-0005Zn-7Z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 16:41:18 +0200 Original-Received: from localhost ([::1]:47408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojLsC-0000pR-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 10:41:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojLry-0000pE-Qu for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 10:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39203) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojLry-0002O2-Fh for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 10:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojLry-0005eD-AO for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 10:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 14:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58168 X-GNU-PR-Package: emacs Original-Received: via spool by 58168-submit@debbugs.gnu.org id=B58168.166575840721609 (code B ref 58168); Fri, 14 Oct 2022 14:41:02 +0000 Original-Received: (at 58168) by debbugs.gnu.org; 14 Oct 2022 14:40:07 +0000 Original-Received: from localhost ([127.0.0.1]:38281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojLr4-0005cT-LO for submit@debbugs.gnu.org; Fri, 14 Oct 2022 10:40:06 -0400 Original-Received: from mail-lj1-f181.google.com ([209.85.208.181]:46643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojLr1-0005bo-MF for 58168@debbugs.gnu.org; Fri, 14 Oct 2022 10:40:04 -0400 Original-Received: by mail-lj1-f181.google.com with SMTP id b18so6224274ljr.13 for <58168@debbugs.gnu.org>; Fri, 14 Oct 2022 07:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=+XtmI74f990yMRBxy98X1xGsqBQl1B0hlva/r/i9WUY=; b=UbRZ1m9b8my6/TjN68P3Jk8TM01APHy6OLK67l3x6JVB9svKVEN9Wt9Rptck8sJk41 B5J7utrrANUwrxht/MrCt4Ksf1Psmx7RhFTX60iGjaX+UbFYJzNhPJvnVe6Xc+mMci2t lpkKZSu/N8IC2C+8INwjckCyidaL5ERer/90lBjzafUg4MaJg8cvg3TINufvBU1KE+CF kNhYvWV2pdYAdbQpnD10redEFRezusrSUXX47QyeI4sy9c9XKIWAd5ucixFIm79w4KJI 58VaRtMtSzetz+RznXXorksU9ziIFyNg//CNxrTB6V0bHFhBhOtL5xlZNutymGF22Hon QsRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+XtmI74f990yMRBxy98X1xGsqBQl1B0hlva/r/i9WUY=; b=muP9SJEWVPP44/syPges1YXqTlqznJFdf17k2xgWgsidu6k/LHRArrMN5YEviRKFyr YcF+I/PeqafokXYDT4eTTL0bCXqT4/TC5DIdgRL0B2eY2nEjJHilkgHTfPrDtef4X4Q9 /4GpGpI0ME4YHEFTz8/O8kMHEkHngNR7bzVu10ZgVNxBQqr3jMUOmINr1vAWT0k7wFTY Zv/mny3tmWpBnDlrte/DNOGg0yv/wukRPEYa/6vnMFd/T7iKKGlWQaKXEMG2ZrK8jUT/ QS0nyJK9gIGiLwOxgsB6auJ9st4lFH2UTRiUOk/seqPNXuJYo4UPVGb47iNNYhdftLAO JiTQ== X-Gm-Message-State: ACrzQf0O5kIj71bXdAmBaQhjt1mv51KD+SeV0jsAQgIMZs6WndNhJ02u 66n1n5qVgJIuaBz24VV7+sooEgzMNAo= X-Google-Smtp-Source: AMsMyM71S4BPsu1Rw52n/ZDA6RrOfTdVdeeufxESqJVnzVKDUxogZG5gANfdDeh++0+NDyZ9m/xVbw== X-Received: by 2002:a05:651c:17a7:b0:261:c0b1:574b with SMTP id bn39-20020a05651c17a700b00261c0b1574bmr2040557ljb.40.1665758397387; Fri, 14 Oct 2022 07:39:57 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id s9-20020a2eb629000000b0026dfbdfc1ddsm417501ljn.11.2022.10.14.07.39.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Oct 2022 07:39:55 -0700 (PDT) In-Reply-To: <83lepqlqdy.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245451 Archived-At: As performance is more acceptable now I'm not going to take any further = action with respect of string<, but let me just answer your questions: 8 okt. 2022 kl. 09.35 skrev Eli Zaretskii : > I suggested to use memchr to find whether a string has any > C0 or C1 bytes, _before_ doing the actual comparison, to find out > whether a multibyte string includes any raw bytes, which would then > require slower comparisons. That isn't practical; we would traverse each argument in full, twice, = even if there is a difference early on. While memchr is fast for what it = does, it will still need to look at every bit of its input. > I also suggested to try memmem as yet another possibility There is no reason to believe that this would help in any way. > This is me being happy. Thank you, let's both rejoice then! Again, the improvements and analyses = have been worthwhile.