Re: memset (was: Redundant memset in AIO read_events)

Arjan van de Ven (arjanv@redhat.com)
10 Jul 2003 12:19:21 +0200


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-6638-1057832520-0001-2
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2003-07-10 at 12:04, Etienne Lorrain wrote:
> Note that using memset() is better reserved to initialise variable-size
> structures or buffers. Even if memset() is extremely optimised,
> it is still not as fast as not doing anything.

this is not always true....
memset can be used as an optimized cache-warmup, which can avoid the
write-allocate behavior of normal writes, which means that if you memset
a structure first and then fill it, it can be halve the memory bandwidth
and thus half as fast. This assumes an optimized memset which we
*currently* don't have I think... but well, we can fix that ;)

--=_courier-6638-1057832520-0001-2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Transfer-Encoding: 7bit
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA/DT2pxULwo51rQBIRAjYZAJ0e3LDgB2zo/B3cTKzNPOJoeCf/VQCcDGV/
RNKxJXrywBqU1REePcf+zRg=
=ie72
-----END PGP SIGNATURE-----

--=_courier-6638-1057832520-0001-2--