Re: [PATCH 2/2] lib/string: Improve str_has_prefix() performance
From: Andy Shevchenko
Date: Mon Apr 07 2025 - 10:00:02 EST
On Mon, Apr 07, 2025 at 09:15:05PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
>
> str_has_prefix() is frequently invoked to return length of the prefix
> string if a string has another string as prefix, but its performance
> is degraded by the strlen() loop contained.
>
> Improve its performance by eliminating the strlen() loop.
NAK.
--
With Best Regards,
Andy Shevchenko