You will gain a small improvement in power by moving your ISR to RAM. You will gain a huge improvement in power by avoiding sprintf and floating point entirely. Yes, that second one is a bit glib, since there are some things you just have to do. But you can gain a lot by just doing less of them. (Paraphrasing P.J. Plauger: The fastest code is the code which isn't executed at all.) Avoid floating point by using scaled arithmetic or 32-bit integers (or fixed point). Avoid sprintf by writing specialized text formatting functions -- you'll have to do the same arithmetic, but you won't have to dance around all the fancy sprintf features you aren't using.
↧