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: [RFC] strcpy optimizations


On 01/29/13 12:15, OndÅej BÃlka wrote:

> I need to know if it is safe for example to use pblendvb 
> on high 8 bytes while other thread modifies lower 8 bytes?

Why wouldn't it be safe?  If two threads strcpy into the same
buffer, or one strcpies from a buffer while another is
strcpying into that buffer, the resulting behavior is undefined,
so the GNU C library can do what it likes.  It shouldn't
matter whether pblendvb is atomic; you should be able to use it.

> Third question is what usage is worth optimizing. When I looked how 
> firefox(biggest usage on my computer) most of calls are used to copy 
> a english dictonary. I do not know what is used strncpy in font 
> configuration which also takes considerable portion

strncpy should be lower priority, I'd say.  Typically, a program
that uses strncpy doesn't care all that much about performance.


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