From owner-freebsd-hackers Sun Jul 29 14:59:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from obsecurity.dyndns.org (adsl-64-169-104-149.dsl.lsan03.pacbell.net [64.169.104.149]) by hub.freebsd.org (Postfix) with ESMTP id 4B4E937B401; Sun, 29 Jul 2001 14:59:18 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 6BBD966B25; Sun, 29 Jul 2001 14:59:17 -0700 (PDT) Date: Sun, 29 Jul 2001 14:59:17 -0700 From: Kris Kennaway To: David O'Brien Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: [PATCH] reduce text(code) size and improve clarity of pkg_add Message-ID: <20010729145916.D94563@xor.obsecurity.org> References: <20010727214412.A91434@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="IMjqdzrDRly81ofr" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010727214412.A91434@dragon.nuxi.com>; from obrien@FreeBSD.ORG on Fri, Jul 27, 2001 at 09:44:12PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --IMjqdzrDRly81ofr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 27, 2001 at 09:44:12PM -0700, David O'Brien wrote: > I'd like to apply this patch to pkg_add which reduces the amount of code > the compiler generates, and improves the clarity of the code. >=20 > 1. s_strl* is obvious some form of "safe" strl{cpy,cat}. But *WHAT* > does it make "safe"? Isn't obvious w/o having to track down the > s_strl{cat,cpy} function definitions. >=20 > 2. The current code has more function call overhead than is needed. And > it reduces the size of the basic block for the optimizer to work on. > It also potentially has cache miss penalties. I now think these should be macros which do the if() test and the errx. Kris --IMjqdzrDRly81ofr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7ZIc0Wry0BWjoQKURAqy2AKDGw4Aokoqb+9GwJIBvtRTwKSA/lgCgztHu hz8Ki8NtiKQ+3wDb015cJiI= =w8eC -----END PGP SIGNATURE----- --IMjqdzrDRly81ofr-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message