This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/43108] mixed complex<T> multiplication horribly inefficient
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2010 21:43:25 -0000
- Subject: [Bug libstdc++/43108] mixed complex<T> multiplication horribly inefficient
- References: <bug-43108-2589@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from paolo dot carlini at oracle dot com 2010-02-17 21:43 -------
(In reply to comment #3)
> Well, but float * complex<float> isn't the same as complex<float> *
> complex<float>. But the library (and also C promotion if you write
> that in literal C) presents us with complex<float> * complex<float>.
Where, exactly, the library presents complex * complex instead of complex *
float? I really don't see it. I see things like:
complex<float>&
operator*=(float __f)
{
_M_value *= __f;
return *this;
}
and I don't see where the library explicitly transforms __f to a complex, I see
something like complex = complex * float. But really, we have been through this
*already*, I'm absolutely sure, and I have zero problems with changing the
above, if Gaby agrees and you all are sure something changed since the lat
time, it's a 5 minutes work, but I'm still convinced that this is something
much more generally useful to optimize than the library.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43108