Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top