From owner-freebsd-hackers Thu Feb 2 22:45:30 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id WAA00418 for hackers-outgoing; Thu, 2 Feb 1995 22:45:30 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id WAA00357 for ; Thu, 2 Feb 1995 22:45:15 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id QAA31188; Fri, 3 Feb 1995 16:49:07 +1100 Date: Fri, 3 Feb 1995 16:49:07 +1100 From: Bruce Evans Message-Id: <199502030549.QAA31188@godzilla.zeta.org.au> To: bde@zeta.org.au, davidg@Root.COM Subject: Re: Optimizing CVS? Cc: hackers@freefall.cdrom.com Sender: hackers-owner@FreeBSD.org Precedence: bulk > The bcmp() is implemented as assembly in support.s. Why do think it is the >slow C version? I was confused by the version in sys/libkern. Most of the functions in ibkern aren't duplicated in support.s. I think it is a good idea not to put the ones that are used a lot in libkern so that you are forced to write a special version. This may be why bcopy and bzero aren't in libkern. The version in support.s isn't very good for misaligned pointers. The best version to use depends on the data. The version in support.s is good for large well-aligned buffers, but for stat() it is used a lot on counted strings. Short strings are best handled by inline code using "rep cmpsb" on 386's and non-CISC instructions on 486's Bruce