This is the mail archive of the gcc-help@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]

Fwd: GCC Optimization for expressions


Hi,

I am having a complicated mathematical expression to compute. What
would be a good way to compute it?
1. Should I write a single statement with many mathematical operations
in same statement? or
2. Fragment the expression and compute one operation in each step and
storing partial results in local variables and using them in
subsequent operations?

Readability or maintainability is not an issue for me. I want
performance as high as possible, in terms of less clock cycles, low
cache misses and low memory access. Even few clock cycle save or few
less cache misses or memory access would be big benefits to me.



Regards,
Nirav Shah.


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