| ??? 05/29/02 13:41 Read: times |
#23601 - RE: Performance improvement |
Do you have general rules and guidelines for improving performance of a program other than common sense!
yes, ASSEMBLER you will gain 80% of the possible performance improvement working 20% of the code. These are not rules, just things that have worked for me when forced to stick to C. Try to write the routines in various ways e.g. if you have struct within struct within struct you will usually gain a lot by making it one struct. If you have a lot of accessses to a particular slot in a struct, try to make a pointer to this entry. Every access to a point in a struct require an add, if this was a "plain" variable no add would be needed. Overuse of structs is a very common cause of low performance. I definitely do not suggesst you make your program unreadable by totally avoiding structs, just use them whith care. Often looking at the assembler code produced by the compiler you will see the "secret" to rewriting the C to gain better performance. The slowest code I have ever seen was produced by a programmer whose reaction to every performance enhancement I made to the C code was "this is not REAL C". The compiler is supposed to take care of all this but it is not magic and it does need your help if you need maximum performance. Erik |
| Topic | Author | Date |
| Performance Analyser in keil | 01/01/70 00:00 | |
| RE: Performance Analyser in keil | 01/01/70 00:00 | |
| RE: Performance Analyser in keil | 01/01/70 00:00 | |
| RE: Performance Analyser in keil | 01/01/70 00:00 | |
| RE: Performance Analyser in keil | 01/01/70 00:00 | |
| RE: Performance improvement | 01/01/70 00:00 | |
| RE: Performance improvement | 01/01/70 00:00 | |
| RE: Performance improvement | 01/01/70 00:00 | |
| RE: Performance improvement | 01/01/70 00:00 | |
| RE: To Andy | 01/01/70 00:00 | |
| RE: Performance Analyser in keil | 01/01/70 00:00 | |
| RE: Performance Analyser in keil | 01/01/70 00:00 | |
RE: To Andy | 01/01/70 00:00 |



