[PATCH] Come up with htab_hash_string_vptr and use string-specific if possible.

Martin Liška mliska@suse.cz
Wed Nov 7 08:54:00 GMT 2018


On 11/5/18 7:37 PM, Michael Matz wrote:
> Hi,
> 
> On Fri, 2 Nov 2018, Martin Liška wrote:
> 
>> V2 of the patch.
>>
>> Thoughts?
> 

Hi.

> Whereever the new function belongs it certainly isn't system.h.  Also the 
> definition in a header seems excessive.  Sure, it enables inlining of it, 
> but that seems premature optimization.  It contains a loop, and inlining 
> anything with loops that aren't very likely to loop just once or never 
> just blows code for no gain.  Also as the function is leaf there won't be 
> any second-order effect from inlining.

Ok, works for me. As you know my main motivation was to provide stronger type
declaration that can be used for 'const char *'. So what about providing 2 wrappers
and poisoning the implementation?

Martin

> 
> 
> Ciao,
> Michael.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hash.patch
Type: text/x-patch
Size: 693 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181107/5187b089/attachment.bin>


More information about the Gcc-patches mailing list