Re: [PATCH] urlmatch: use hex2chr() in append_normalized_escapes()
- From
René Scharfe <l.s.r@web.de>
- Date
- Jul 8, 2017, 15:15 UTC
- Message-ID
- <46294b4f-5e6d-bbf3-8b93-9d23df5ce07b@web.de>
- In-Reply-To
- <A1589486-3E84-494C-9B8D-3FB1724B3145@gmail.com>
Am 08.07.2017 um 16:28 schrieb Kyle J. McKay:
Show 13 quoted lines
> 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é