Timeline for Optimizing code for ATtiny10
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 6, 2022 at 8:35 | comment | added | next-hack | @Michael, I think I quite know that... Still, what's the connection between Redy000's answer and the fact that loop() or DigitalWrite() might be inlined, or implemented as an actual branch ? | |
| Feb 6, 2022 at 8:29 | comment | added | Michael | @next-hack: Function calls are instructions which use up valuable flash space (and need time to execute). | |
| Feb 5, 2022 at 16:17 | comment | added | next-hack | What does it matter, if the function was inlined or not in this context? At the end the function code gets executed, regardless if the compiler inlined it or not. | |
| Feb 5, 2022 at 1:48 | comment | added | Peter Mortensen | Neither loop() nor digitalWrite() may not even be called. The underlying GCC compiler is pretty good at inlining, optimising them down to single assembly instructions. | |
| Feb 4, 2022 at 18:30 | comment | added | Dave X |
That's better randomness than an RNG. Since delay and its clock is running, you could use its TCNT0 or TCNT0L instead of count and get faster counting at zero cost.
|
|
| S Feb 4, 2022 at 14:01 | review | First answers | |||
| Feb 4, 2022 at 14:13 | |||||
| S Feb 4, 2022 at 14:01 | history | answered | Redy000 | CC BY-SA 4.0 |