I have frequently made the observation that a key difference
between embedded and desktop system programming is variability:
every Windows PC is essentially the same, whereas every embedded
system is different. There are a number of implications of this
variability tools need to be more sophisticated and flexible;
programmers need to be ready to accommodate the specific
requirements of their system; standard programming languages are
mostly non-ideal for the job. I have written on a number of
occasions [like here] about the non-ideal nature of standard
programming languages for embedded applications. A specific
aspect that can give trouble is control of optimization …
Optimization is a big topic. Broadly it is a set of processes
and algorithms that enable a compiler to advance from
translating code from [say] C into assembly language to
translating an algorithm expressed in C into a functionally
identical one expressed in assembly. This is a subtle, but
important difference. Again, I have explored this before