Replies: 1 comment
-
None whatsoever. I've never actually found a way to make the Arduino IDE produce a debug build. All of my testing has been on an Arduino Uno or an Arduino Leonardo equivalent device and I didn't do much measuring because size naturally varies by use case. I find typically GCC inlines more or less all functions up to the 3rd use, and then decides on a case-by-case basis depending on whether the function is large enough. It'll almost certainly inline simple things like addition and subtraction, whether it inlines extracting the fractional or integer parts of a number might depend on whether the target device has a barrel shifter or not. Similarly how it behaves with multiplication and division will likely depend on the target processor - it's less likely to inline for something like AVR where only 8x8 multipllication can be done natively and all other multiplication and division must be done with an algorithm, but for something like x86/x64 it may well inline everything.
This kind of thing usually varies per compiler, but I expect most compilers avoid all inlining in a debug build simply to make breakpoints function properly. Though I suppose a low-resource embedded target might make a difference to that, I've never really tested. Bottom line: I can't predict what an unknown compiler will do for an unknown platform. You'll likely get more useful information out of writing and running a few tests for your target compiler and platform. If you're trying to get it working in a non-Arduino environment or aren't sure how to use the library then I may be able to help there, but anything I could possibly say about performance would be no more than an educated guess based on generalisations of how I'd expect a decent modern compiler to behave. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm in the process of tidying up a very old project of mine (>23 years old) using old school C++.
Audio processing is done with hand-crafted fixed-point, but planning to modernize it so I can try different fractional bits, etc.
I've been looking at FixedPointsArduino to use as a replacement.
Out of curiosity, what's your experience with debug builds? Is the compiler inlining all that even in debug builds, or I'll have to force inline?
Beta Was this translation helpful? Give feedback.
All reactions