This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization of complex multiplication as of gcc 4.0.1


>      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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]