Date: Thu, 7 Jun 2018 13:27:33 +0000 From: Brooks Davis <brooks@freebsd.org> To: Ravi Pokala <rpokala@freebsd.org> Cc: "Jonathan T. Looney" <jtl@freebsd.org>, Mateusz Guzik <mjguzik@gmail.com>, Mateusz Guzik <mjg@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334702 - head/sys/sys Message-ID: <20180607132733.GA41876@spindle.one-eyed-alien.net> In-Reply-To: <468B8AB5-D2C7-4033-9F24-6E1F94DC7137@panasas.com> References: <201806060508.w56586c9053686@repo.freebsd.org> <6E6E92B2-7536-4281-8EAF-72823E84902E@panasas.com> <CAGudoHF9Kw6gFyNkJADzCCg0vvSq-o%2BrWwxBX15cKszDSV5KiA@mail.gmail.com> <47E06039-234C-4078-A732-BFF230D2472B@panasas.com> <CADrOrmu5gYakgXu4bM9CMh5zQa2LZv6pA7tTEScoZH-hs9hMTQ@mail.gmail.com> <468B8AB5-D2C7-4033-9F24-6E1F94DC7137@panasas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 07, 2018 at 12:01:00AM -0400, Ravi Pokala wrote: > > I believe the theory is that the compiler (remember, this is __builtin_= memset) can optimize away portions of the zeroing, or can optimize zeroing = for small sizes. >=20 > Ahhh! I didn't consider that the compiler would be doing analysis of the = larger context, and potentially skipping zeroing parts that are set immedia= tely after the call. Clang does this. It does make for some quite interesting object code, but the result is that zeroing with __builtin_memset() is basically free for mostly-initialized structures. -- Brooks --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbGTLEAAoJEKzQXbSebgfA8cIH/RlCwFDXLPa31BCS4XMjzqxJ /31i3IEKOH7/4aQHxlf58rquy6xAi1w3nI0bLavyCU/9BFoJeAvwat1UkdVCK92x 6z3tdOP0XUK2hAJidT1T4/lgWT8VbRERnGOnQseL2fSV9Cb64PDkP6RLB1lEVBTE I4XzEM6oHOu5q6H74z2DDH4R0pNO1LU2K35pm4M4QTYGW5DWV7sXtnTzUONjnO07 6XSV8B/jFNiTUNEqY81o9jkcpk6ocCPKDsgIjwym6hDbEGrVrSmJFw6oDzoLoPI+ wkwMh1LDtm07VxgD5n8wt7RjUb/2a79GuQ/AcZhstzvnZekBP8iyGBJSXBgvJF0= =rAJw -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180607132733.GA41876>