Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2013 13:13:46 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        Christoph Mallon <christoph.mallon@gmx.de>, freebsd-arch@FreeBSD.org
Subject:   Re: Large Capsicum patch for review.
Message-ID:  <20130226121345.GB1341@garage.freebsd.pl>
In-Reply-To: <867glvbbjz.fsf@ds4.des.no>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <pjd@FreeBSD.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130226121345.GB1341>