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

2015-06-16 Thread Orestes Leal Rodriguez
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. Orestes Leal Rodriguez. --- lib/string.c.orig 2015-06-15 23:59:32.768346193 -0400 +++ lib/string.c2015-06-16 00

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

2015-06-16 Thread Orestes Leal Rodriguez
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. Orestes Leal Rodriguez. --- lib/string.c.orig 2015-06-15 23:59:32.768346193 -0400 +++ lib/string.c2015-06-16

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

2015-06-16 Thread Orestes Leal Rodriguez
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. Orestes Leal Rodriguez. --- lib/string.c.orig 2015-06-15 23:59:32.768346193 -0400 +++ lib/string.c2015-06-16 00

[PATCH 1/1] lib: small update for strlen, strnlen, use less cpu instructions

2015-06-16 Thread Orestes Leal Rodriguez
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. Signed-off-by: Orestes Leal Rodriguez --- diff --git a/lib/string.c" "b/lib/string.c index 992bf30..c873436 10

[PATCH 1/1] lib: small update for strlen, strnlen, use less cpu instructions

2015-06-16 Thread Orestes Leal Rodriguez
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. Signed-off-by: Orestes Leal Rodriguez --- diff --git a/lib/string.c b/lib/string.c index 992bf30..c873436 100644 --- a

[PATCH 1/1] lib: small update for strlen, strnlen, use less cpu instructions

2015-06-16 Thread Orestes Leal Rodriguez
-0x4(%ebp),%eax leave ret With this a few cpu instructions are saved. Signed-off-by: Orestes Leal Rodriguez --- Signed-off-by: Orestes Leal Rodriguez diff --git a/lib/string.c b/lib/string.c index 992bf30..c873436 100644 --- a/lib/string.c +++ b/lib/string.c @@ -17,6 +17,10 @@ * * Sat Feb 0

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

2015-06-18 Thread Orestes Leal Rodriguez
thank you for your comments, begginer mistakes (I guess), On 6/17/15, Richard Weinberger wrote: > Am 17.06.2015 um 00:51 schrieb Orestes Leal Rodriguez: >>> Use the force^Wcheckpatch.pl. >> This is the output of checkpatch.pl: >> output of checkpatch: total: 0 erro