Re: [PATCH] lib/string.c: Improve strcasecmp speed by not lowering if chars match

From: Nathan Moinvaziri
Date: Tue Oct 25 2022 - 18:37:41 EST


On 10/25/2022 12:55 PM, Rasmus Villemoes wrote:
> Are there any code paths in the kernel where strcasecmp performance
> matters? strcmp, sure, but strcasecmp or strncasecmp? I don't think so.
> If anything, we should nuke the complication in strncasecmp(), and then
> make strcasecmp() simply do strncasecmp(a, b, SIZE_MAX).

It looks like several of the string functions could be collapsed in that
way.

Nathan