-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate Rcon array to save space #43
Comments
Duly noted, thank you :) I think another issue-opener also comments on this exact issue. |
This rom elements can be used to store xtime computed values instead to increase performance which is not the best. |
@EliotWealth the performance is definitely not optimal in this module. |
This issue has been addressed after removing some of the elements in the Rcon array, as suggested in PR #12. I'm keeping the issue open, because I like the description of how to avoid the array. |
To make better performance at Nano seconds you can replace For loop at multiple place by memset :) |
The
Rcon
array currently takes 255 bytes of ROM, but only its first 11 elements are accessed, since there are only 10 rounds. Therefore the remaining 244 elements should be removed. The first element can also be removed when the array index is adjusted by-1
.The whole array can be replaced by starting a local variable
uint8_t rcon = 0x01
and applyingxtime
after each round, which is a little slower but eliminates the need for fixed constants.The text was updated successfully, but these errors were encountered: