Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What coding choices impact performance?

0
Posted

What coding choices impact performance?

0

Performance is affected by: • The way loops are organized. For best performance, the innermost loop in a loop nest should access arrays with a stride of one. • The way the data is structured. For example, a single structure containing arrays of data may be more efficient than an array of structures, since the access to the arrays may allow vectorization. • The iteration counts of loops. Longer iteration counts are generally better, as the loop overhead is amortized over more iterations. Tiny iteration counts (like two or three elements) may be faster to process in scalar. Extremely long loops (fluxing through tens of thousands of array elements) can exceed the size of cache and interfere with data reuse. • The data type of arrays. For example, if the arrays are double precision floating point, then you would get no speedup from AltiVec. • How the memory hierarchy is used. Most current processors are relatively unbalanced between memory bandwidth and CPU capacity. If you have large data

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123