Operator overloading leads to bad code optimization
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Dec 6 11:55:08 UTC 2021
On Monday, 6 December 2021 at 00:41:06 UTC, max haughton wrote:
> These kinds of wacky phase ordering (I assume) issues is why I
> am slightly distrustful of GDC post-inlining decision.
Multiplying with 0.5 only affects the exponent, but the add could
overflow/underflow. Maybe that is wacky for D since it specifies
IEEE compliance, but in the gcc-family -O# is really a shortcut
for a set of options. If I specify -O or -O3 I would expect the
same options as gcc. Otherwise people will claim that C++ is
faster?
More information about the digitalmars-d-ldc
mailing list