This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: optimization of complex multiplication as of gcc 4.0.1
- From: Benjamin Kosnik <benjamin dot kosnik at gmail dot com>
- To: Luc Bourhis <Luc dot Bourhis at durham dot ac dot uk>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 8 Sep 2006 10:20:42 +0200
- Subject: Re: optimization of complex multiplication as of gcc 4.0.1
- References: <95D7A900-A7AC-4EB9-A545-9F7B673D70A5@durham.ac.uk>
> std::complex<double> a(1,0);
> std::complex<double> b(1,1.2);
> std::cout << a*b << std::endl;
For:
#include <complex>
void foo()
{
std::complex<double> a(1,0);
std::complex<double> b(1,1.2);
a*b;
}
I get this on x86 with gcc-today:
_Z3foov:
.LFB1797:
pushl %ebp
.LCFI0:
movl %esp, %ebp
.LCFI1:
popl %ebp
ret
Looks pretty optimal to me.
-benjamin