Topic: Allowing std::complex's magic permission for other types
Author: Myriachan <myriachan@gmail.com>
Date: Mon, 26 Mar 2018 13:26:58 -0700 (PDT)
Raw View
------=_Part_15713_303201633.1522096018348
Content-Type: multipart/alternative;
boundary="----=_Part_15714_1092331825.1522096018348"
------=_Part_15714_1092331825.1522096018348
Content-Type: text/plain; charset="UTF-8"
I would like to propose that C++ get a mechanism by which the magical
ability of std::complex<T> * to be reinterpret_cast to T * could be allowed
for other classes.
A simple case of this is a vector4 type:
struct vector3 { float x; float y; float z; float w; };
The performance difference is strong enough that our project actually gets
a much larger performance *increase* from using -fno-strict-aliasing versus
-fstrict-aliasing with the changes required for compliance.
Melissa
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/a3462649-a7bd-4215-b162-e8fe922df02d%40isocpp.org.
------=_Part_15714_1092331825.1522096018348
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I would like to propose that C++ get a mechanism by which =
the magical ability of std::complex<T> * to be reinterpret_cast to T =
* could be allowed for other classes.<br><br>A simple case of this is a vec=
tor4 type:<br><br>struct vector3 { float x; float y; float z; float w; };<b=
r><br>The performance difference is strong enough that our project actually=
gets a much larger performance <i>increase</i> from using -fno-strict-alia=
sing versus -fstrict-aliasing with the changes required for compliance.<br>=
<br>Melissa<br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/a3462649-a7bd-4215-b162-e8fe922df02d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a3462649-a7bd-4215-b162-e8fe922df02d=
%40isocpp.org</a>.<br />
------=_Part_15714_1092331825.1522096018348--
------=_Part_15713_303201633.1522096018348--
.