From: "René Scharfe" <l.s.r@web.de>
To: "Kyle J. McKay" <mackyle@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] urlmatch: use hex2chr() in append_normalized_escapes()
Date: Sat, 8 Jul 2017 17:15:30 +0200 [thread overview]
Message-ID: <46294b4f-5e6d-bbf3-8b93-9d23df5ce07b@web.de> (raw)
In-Reply-To: <A1589486-3E84-494C-9B8D-3FB1724B3145@gmail.com>
Am 08.07.2017 um 16:28 schrieb Kyle J. McKay:
> On Jul 8, 2017, at 01:59, René Scharfe wrote:
>
>> Simplify the code by using hex2chr() to convert and check for invalid
>> characters at the same time instead of doing that sequentially with
>> one table lookup for each.
>
> I think that comment may be a bit misleading as the changes are just
> switching from one set of inlines to another. Essentially the same
> sequential check takes place in the hex2chr inlined function which is
> being used to replace the "one table lookup for each". An optimizing
> compiler will likely eliminate any difference between the before and
> after patch versions. Nothing immediately comes to mind as an alternate
> comment though, so I'm not proposing any changes to the comment.
Right, the table lookups for isxdigit and hexval are not duplicated when
compiling with -O2.
René
prev parent reply other threads:[~2017-07-08 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 8:59 [PATCH] urlmatch: use hex2chr() in append_normalized_escapes() René Scharfe
2017-07-08 14:28 ` Kyle J. McKay
2017-07-08 15:15 ` René Scharfe [this message]
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: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46294b4f-5e6d-bbf3-8b93-9d23df5ce07b@web.de \
--to=l.s.r@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mackyle@gmail.com \
/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://80x24.org/mirrors/git.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).