Date: Sat, 2 Apr 2005 18:52:45 +0000 (UTC) From: David Schultz <das@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/string strcspn.c strspn.c src/sys/libkern strspn.c Message-ID: <200504021852.j32IqjhR031587@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
das 2005-04-02 18:52:44 UTC
FreeBSD src repository
Modified files:
lib/libc/string strcspn.c strspn.c
sys/libkern strspn.c
Log:
Replace the current strspn() and strcspn() with significantly faster
implementations inspired by the ones in DragonFly. Unlike the
DragonFly versions, these have a small data cache footprint, and my
tests show that they're never slower than the old code except when the
charset or the span is 0 or 1 characters. This implementation is
generally faster than DragonFly until either the charset or the span
gets in the ballpark of 32 to 64 characters.
Revision Changes Path
1.5 +39 -36 src/lib/libc/string/strcspn.c
1.5 +40 -31 src/lib/libc/string/strspn.c
1.2 +40 -24 src/sys/libkern/strspn.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504021852.j32IqjhR031587>
