Skip to content
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

Refactor CommandView::to_owned #20

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

robin-nitrokey
Copy link
Member

This patch replaces Vec::from_slice with Vec::extend_from_slice in CommandView::to_owned. This reduces the stack usage on lpc55 to one third (!), from ca. 23 kB to ca. 8 kB with S = 7609.

This patch replaces Vec::from_slice with Vec::extend_from_slice in
CommandView::to_owned.  This reduces the stack usage on lpc55 to one
third (!), from ca. 23 kB to ca. 8 kB with S = 7609.
@sosthene-nitrokey
Copy link
Contributor

I see similar result in for the NRF target.

@robin-nitrokey
Copy link
Member Author

Interesting, thanks for checking. I’ll try to take a look at the IR to investigate the differences between the two versions and to produce a minimal example demonstrating the problem so that we can report it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants