From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Matching regex case-sensitively in C strings? Date: Thu, 10 Nov 2022 10:52:40 +0100 Message-ID: <481B14DE-D209-4B5B-A517-0F721E7C5854@acm.org> References: <218795BA-107D-4A86-9ACF-0A44BD2EC3D2@gmail.com> <83edufyoad.fsf@gnu.org> <580E87E6-DCFD-42AE-807A-339BBB3878C2@acm.org> <5711A9D3-7BCB-44AE-8911-5E039FF5FBB8@gmail.com> <838rklxmnm.fsf@gnu.org> <4FB7E922-5E36-4E0C-9681-9EC0E719CC8D@acm.org> <834jv8uvjj.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="28123"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 10 10:53:36 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ot4Fc-00079M-Gh for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Nov 2022 10:53:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot4F9-0003G7-Ur; Thu, 10 Nov 2022 04:53:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot4F6-0003D2-Io for emacs-devel@gnu.org; Thu, 10 Nov 2022 04:53:05 -0500 Original-Received: from mail156c50.megamailservers.eu ([91.136.10.166] helo=mail51c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot4F4-0001v9-FC; Thu, 10 Nov 2022 04:53:04 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1668073976; bh=F0x1A/pE5Ae3tToiC3ojdyGklFMyAu9YEC+b2+g+huk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=qddN46DhKHW65Bxi4gctvOpEyvelo+rMuVsk49F2QtBQf7WbbKt6EM5cawRoobZML avSaCzE00x8ZLeRKhNP7EBM4TSHq4PPHc+FxOHFN22ifFAATH9sFg2HJ6vzfu/aySW u2bMYXcbPgxP2E6KqFeh0px8wCa2ELPD2R6bQFnQ= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se [188.150.171.209]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 2AA9qfKS007578; Thu, 10 Nov 2022 09:52:46 +0000 In-Reply-To: <834jv8uvjj.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A782F23.636CC9F4.0048, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.10.166; envelope-from=mattiase@acm.org; helo=mail51c50.megamailservers.eu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299473 Archived-At: 9 nov. 2022 kl. 14.06 skrev Eli Zaretskii : >> You are right to worry about it, but there is actually no need for >> concern here: it's a tail call (and the extra argument is last) so >> it should compile to an unconditional jump (and setting a register). >=20 > That's not what I see here, even with -O2. Trying to read your mind, are you using 32-bit x86? Even that shouldn't = be disastrous; it's just some stack manipulation. Hardly noticeable = given that it's a regexp match that comes next. I am definitely guilty of not thinking much of 32-bit x86 when coding = for performance (haven't for a number years). Of course this doesn't = mean we should allow it to become much worse than it needs to be.