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] |
Hi,
I'm not completely sure whether this question belongs to a C/C++ newsgroup,
but it is probably compiler-specific, so I'm trying my luck here.
I'm developing a numerical simulation code which contains operations like this one
double a; int flipsign;
[...]
if (flipsign) a = -a;
in an inner loop which is executed billions of times. I suspect that the conditional slows the execution down, and the "a=-a" statement might not be optimal as well.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |