This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: State of C99 _Complex?


Scott Robert Ladd <coyote@coyotegulch.com> writes:

| My experiments suggest that GCC 3.3 generates slow code when it comes
| to implementing the C99 _Complex types on the Pentium 4.
| 
| I'm not sure if the problem is in my use of gcc (i.e., I missed a
| subtle compile-time switch), or if _Complex support is simply "weak"
| at this point.
| 
| I've tried several complex-dependent applications, and all have
| performed slowly when compiled with gcc 3.3.
| 
| A case in point involves multiplication and addition of
| double-precision complex numbers. The C version of the code, using
| double complex, runs in 630 seconds, while the C++ version of the
| code, using complex<double> runs in 285 seconds.

I find that very surprising because std::complex<double> is more or
less a wrapper around __complex__ double, which is supposed to be
_Complex double.

-- Gaby


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