From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Mattias Engdegård" <mattiase@acm.org>,
casouri@gmail.com, emacs-devel@gnu.org
Subject: Re: Matching regex case-sensitively in C strings?
Date: Thu, 10 Nov 2022 12:35:56 +0100 [thread overview]
Message-ID: <87tu37dotf.fsf@gmail.com> (raw)
In-Reply-To: <83wn83qcpr.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Nov 2022 13:18:56 +0200")
>>>>> On Thu, 10 Nov 2022 13:18:56 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> From: Mattias Engdegård <mattiase@acm.org>
>> Date: Thu, 10 Nov 2022 10:52:40 +0100
>> Cc: casouri@gmail.com, emacs-devel@gnu.org
>>
>> 9 nov. 2022 kl. 14.06 skrev Eli Zaretskii <eliz@gnu.org>:
>>
>> >> 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).
>> >
>> > 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.
Eli> I agree that the effect is probably minuscule, but it's still there.
Eli> And on some architectures it could be more than that.
Eli> Why not have two separate functions for these two jobs? The code is
Eli> short, and some duplication is not an issue in this case.
Or one generic function and two #defines that pass in the appropriate
canonicalize table value.
Robert
--
next prev parent reply other threads:[~2022-11-10 11:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 5:41 Matching regex case-sensitively in C strings? Yuan Fu
2022-11-07 11:52 ` Eli Zaretskii
2022-11-07 20:35 ` Yuan Fu
2022-11-08 10:18 ` Mattias Engdegård
2022-11-08 12:29 ` Eli Zaretskii
2022-11-08 19:31 ` Yuan Fu
2022-11-08 19:37 ` Eli Zaretskii
2022-11-08 20:59 ` Yuan Fu
2022-11-09 10:53 ` Mattias Engdegård
2022-11-09 10:33 ` Mattias Engdegård
2022-11-09 13:06 ` Eli Zaretskii
2022-11-10 9:52 ` Mattias Engdegård
2022-11-10 11:18 ` Eli Zaretskii
2022-11-10 11:35 ` Robert Pluim [this message]
2022-11-10 14:20 ` Mattias Engdegård
2022-11-10 22:25 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu37dotf.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).