[haiku-commits] Re: haiku: hrev43558 - src/system/libroot/posix/string

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Dec 2011 11:28:44 +0100

2011/12/25 Ingo Weinhold <ingo_weinhold@xxxxxx>:
> And the code contains so many coding style issues that I won't even bother to
> list them.

Oops, sorry about that.

> Moreover the strlen() implementation should simply use __builtin_strlen(),
> which -- I'd bet my X-mas presents -- is significantly faster on virtually
> all architectures.

Feel free to look at the glibc version of strlen. Codestyle errors
aside, I think I did ok:
http://haiku.it.su.se:8180/source/xref/src/system/libroot/posix/glibc/arch/generic/strlen.c

Why  do I get the feeling I'm stepping on your toes..
I did check that strlen is called a lot and that it can be done better
without to much mess, so I went for it, as it was a small enough
project I could do while sitting on the train.

/Fredrik Holmqvist, TQH

Other related posts: