Messages in this thread | | | From | Arvind Sankar <> | Date | Wed, 19 Aug 2020 09:16:27 -0400 | Subject | Re: [PATCH] lib/string.c: Disable tree-loop-distribute-patterns |
| |
On Tue, Aug 18, 2020 at 08:32:58PM -0700, Linus Torvalds wrote: > On Tue, Aug 18, 2020 at 8:04 PM Arvind Sankar <nivedita@alum.mit.edu> wrote: > > > Might be worth optimizing strnlen etc with the word-at-a-time thing though. > > Yeah, possibly. Except the kernel almost never uses strnlen for > anything bigger. At least I haven't seen it very much in the profiles.
strscpy could be implemented as strnlen+memcpy. I'd think that wouldn't be much slower, especially if strnlen is optimized and the arch has a good implementation of memcpy?
| |