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?


Felix Lee wrote:
Why do you say the problem isn't cabs/abs?  I looked at the x86
assembly I get from those two fragments.  C++ inlines the complex
abs(), C calls cabs() from libm, which takes significantly more
instructions.

Well... you're probably right.


My investigation started with comparing code generated by Intel's compiler with that produced by gcc. Both compilers generate calls to a cabs function, yet Intel runs more than twice as fast.

I assumed they were both linking to the same version of libm. Apparently, they are not, although ldd suggests that they are indeed both using the system libm.

I'll investigate further.

..Scott


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