Re: [PATCH] small update for strlen, strnlen, use less cpu instructions

From: Richard Weinberger
Date: Tue Jun 16 2015 - 06:38:21 EST


On Tue, Jun 16, 2015 at 11:28 AM, Orestes Leal Rodriguez
<lukes357@xxxxxxxxx> wrote:
> very small update to strlen and strnlen that now use less cpu instructions
> by using a counter to avoid the memory addresses substraction to find the
> length of the string.

This is not a valid patch submission. Please see
Documentation/SubmittingPatches.

Anyway, why do you think your patch makes strlen() better?
Now strlen() increments a variable for each character it faces, hence
it will consume more cycles.

--
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/