State of C99 _Complex?
Scott Robert Ladd
coyote@coyotegulch.com
Tue May 20 04:49:00 GMT 2003
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
More information about the Gcc
mailing list