O'Reilly logo

C Programming for Arduino by Julien Bayle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Approaching calculation optimization

This section is an approach. It means it doesn't contain all the advanced tips and tricks for programming optimizations, but contains the optimizations on pure calculation.

Generally, we design an idea, code a program, and then optimize it. It works fine for huge programs. For smaller ones, we can optimize while coding.

Note

Normally, our firmware is small and so I'd suggest that you consider this as a new rule: Write each statement keeping optimization in mind.

I could add something else right now: Don't kill the readability of your code with too many cryptic optimization solutions; I thought of pointers while writing that. I'll add a few lines about them in order to make you familiar with, at least, the concept. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required