From owner-freebsd-arch@FreeBSD.ORG Tue Feb 26 12:12:33 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1CF21761 for ; Tue, 26 Feb 2013 12:12:33 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id C0F57ED0 for ; Tue, 26 Feb 2013 12:12:32 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 9E5D6F7; Tue, 26 Feb 2013 13:09:31 +0100 (CET) Date: Tue, 26 Feb 2013 13:13:46 +0100 From: Pawel Jakub Dawidek To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: Large Capsicum patch for review. Message-ID: <20130226121345.GB1341@garage.freebsd.pl> References: <20130213025547.GA2025@garage.freebsd.pl> <20130213230221.GB1375@garage.freebsd.pl> <20130223221116.GR1377@garage.freebsd.pl> <5129ADC5.5040306@gmx.de> <512A2CA0.2050509@gmx.de> <20130224235936.GX1377@garage.freebsd.pl> <512B3DBB.4080909@gmx.de> <20130225215004.GA1375@garage.freebsd.pl> <867glvbbjz.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l76fUT7nc3MelDdI" Content-Disposition: inline In-Reply-To: <867glvbbjz.fsf@ds4.des.no> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Christoph Mallon , freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 12:12:33 -0000 --l76fUT7nc3MelDdI Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 26, 2013 at 11:43:12AM +0100, Dag-Erling Sm=F8rgrav wrote: > Pawel Jakub Dawidek writes: > > I use size_t as this is preferred type for size, but I don't need size_t > > for iterator, because I know the value will never need more than 16 > > bits, so I use int as a more CPU-friendly type. >=20 > Using int as an iterator can lead to warnings about signedness mismatch > in loop conditions etc., so you should at the very least use unsigned > int. [...] I use 'int' for 'ssize_t' and 'unsigned int' for 'size_t'. > [...] Besides, size_t is equal to unsigned long on all platforms, so > "CPU-friendly" is not a valid argument. Is long more CPU-friendly than int? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --l76fUT7nc3MelDdI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEspvkACgkQForvXbEpPzSmewCgkcEYPerjF8rVacHrEtuvmhF6 P7cAoMp0Zfht4n4XpmEohu877RNbv65O =yhfr -----END PGP SIGNATURE----- --l76fUT7nc3MelDdI--