Forum > Windows

optimized sources

<< < (41/179) > >>

Jason G:
Any tips at all on handling cache thrashing on an early (non HT) p4 ? I waiting on my second profile set, up to run 7 of 19  ::)

_heinz:
As you all know a well structured data-set can better and faster  handled  than a not well structured dataset.
Aligned data are very important for optimal performance. We can help the compiler in itīs work, if we make some rules for data definitions
1.) write all structures together, one after the other
2.) write all double together, one after the other
3.) write all float together, one after the other
4.) write all int together, one after the other
5.) write all char together, one after the other
6.) write all bool together, one after the other

donīt mix definitions and codepieces
donīt make definitions in loops
hold vars global to reduce prolog and epilog of blocks
avoid type-convert

organize  same data-fields as vectors and n-dimensional matrices.
Use structures for vars and datas because it is easy to align structures.

Use structured programming methods for the code.

regards heinz


Jason G:
HAHAHA,  I never saw some of those bad things before this week. I know exactly what you mean.

_heinz:
@jason,
sure, this is not the answer to your question... it is common

Jason G:
Sadly true, It takes a long time to understand the code this way.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version