Investigate possible performance enhancements related to the restricted keyword
Closed this issue · 1 comments
siddMahen commented
The restricted
keyword, when used in front of a pointer function argument, tells the compiler that the underlying memory content of the pointer will only be modified through the pointer in question, and through no other pointer. In theory, this allows the compiler to perform certain optimizations that are normally not possible (see https://en.wikipedia.org/wiki/Restrict), and can yield a significant speed bump.
- Investigate whether the
avr-gcc
compiler optimizes using the restrict keyword at the-Os
level. - If so, figure out where it can be applied.
brunofalmeida commented
This is relatively minor and would add some risk in implementation, so let's not worry about this right now.