Yes to all three questionsThere is some way to measure the code efficiency?
For example... Can I to know when there is code enough in my microcontroller?
If I set a GPIO to toggle its state in the main loop and measure through an oscilloscope, can I get some result?
Measure what exactly?There is some way to measure the code efficiency?
For example... Can I to know when there is code enough in my microcontroller?
If I set a GPIO to toggle its state in the main loop and measure through an oscilloscope, can I get some result?
Sure, you can instrument (using simple gpio signals and internal counters) the controller to provide utilization information of resources like cpu cycles, memory cycles, interrupt cycles that change depending on the method (software and hardware) of handling a problem.There is some way to measure the code efficiency?
For example... Can I to know when there is code enough in my microcontroller?
If I set a GPIO to toggle its state in the main loop and measure through an oscilloscope, can I get some result?
'Code Effeciency' is based on how good a programmer you are; not your MCU. Learn flow-charting, and then learn your programming language inside and out- Not just syntax, but _how_ to really use the language effectively. One thing I recommend, is learning assembly language. When I began, decades ago, I went from BASIC to assembly because assembly let me do the coolest things and was *so fast* compared to anything else. I later learned Pascal, then C and over 40 other programming languages, many of which I still use today.There is some way to measure the code efficiency?
For example... Can I to know when there is code enough in my microcontroller?
If I set a GPIO to toggle its state in the main loop and measure through an oscilloscope, can I get some result?
I think Blum only applies to sufficiently complex algorithms (one might even call them malgorithms), but it's a good reminder that any measure of efficiency should be a) defined and b) not considered in isolation (at least in non-academic projects).Computational complexity theory has proved that there is no optimal program by any measure of complexity (Blum speed up theorem.) You can always come up with another program which is better for all but a finite set of inputs. But, this was a full semester course in grad school, so I cannot give you a proof in a forum post.
Opinion: The better way to measure code efficiency is if it performs flawlessly in your implementation.There is some way to measure the code efficiency?
by Jake Hertz
by Jake Hertz
by Jeff Child