optimization of complex multiplication as of gcc 4.0.1
Benjamin Kosnik
benjamin.kosnik@gmail.com
Fri Sep 8 08:20:00 GMT 2006
> 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
More information about the Libstdc++
mailing list