This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove unnecessary locking when reading iconv configuration [BZ #22062]


On 10/30/2017 09:24 AM, Florian Weimer wrote:
>> -  struct path_elem *result;
> 
> I think it makes sense to keep the result variable because it can be
> kept in a register across calls.  In contrast, the global variable
> has to be reloaded.

What's the difference between loading the value of the global into result
(a register or stack local) and then using it, versus using the value of
the global directly, which gcc will optimize by loading it into a register
or a pseudo (which may be given a stack slot)?

It seems the same to me.

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]