What kind of embedded system are you using? Are you running embedded Linux, for example? What kind of development environment are you using?
Some coding practices:
* Use fixed-point arithmetic instead of floating-point where precision is not critical.
* Replace computationally expensive...