cvs commit: src/lib/libc/string strcspn.c strspn.c src/sys/libkern strspn.c

David Schultz das at FreeBSD.org
Sat Apr 2 10:52:45 PST 2005


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


More information about the cvs-src mailing list