Code optimisation

Status
Not open for further replies.
You have to tell us what processor you are using first. If you post the sections of code that are run most often we can give you pointers about how to make it faster.

I've used Keil C for the 8051. The easiest optimizations have to do with the memory segment you put your variables in. Careful use of memory can have huge speed benefits.

Nigel's joking but if you have a section of code that needs to be really fast you can insert assembly code into your C code.

Also take a quick look over your assembled code. Keil will put the C code inline with the assembly code so you can see how your code compiles and what C lines generate tons of code. This will let you catch messy code segments.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…