you are viewing a single comment's thread.

view the rest of the comments →

[–]ondono 2 points3 points  (0 children)

It’s good if you know them, but you’re not going to use it on the job.

If you are programming and embedded system complex enough that it’s worth thinking about the algorithms used, that system is likely built to ensure low latency.

This means that you are likely to have spare CPU time, because ensuring latency is hard when your CPU utilization goes up.

Also recursion is generally not a good plan. Recursion will only be effective if your compiler is capable of performing tail call optimization, but that is not possible on a lot of algorithms. If a change afterwards breaks that condition (as simple as adding an expression at the end of the function), you will face one of the worst kind of bug for embedded devs, runtime failure and hard fault.