chunks_exact() can be handled by the compiler more efficiently.
Previous code was making a memcpy call for each 4 byte chunk slice.
Hoisting the fifo out of the loop avoids recalculating the pointer each
time.
In my benchmark I see a jump from ~13 megabyte/sec to ~25MB/sec after
this change (opt-level=3). opt-level = "z" goes 9MB/s to 18MB/s.
The benchmark was on a stm32h7s3l8, 600mhz clock, 512 byte bulk writes,
data in DTCM. The benchmark isn't just USB writes, also has some
unrelated memcpys for packet construction.
this requires you to install [`cargo-release`].
note that this does not include a URL pointing to the diff on GitHub as
is usually done in changelogs since `embassy` is a mono-repo and the GH
UI doesn't offer a commit view per folder (see the [GH feature request]
for this).
[`cargo-release`]: https://crates.io/crates/cargo-release
[GH feature request]: https://github.com/orgs/community/discussions/162131
this requires you to install [`cargo-release`].
note that this does not include a URL pointing to the diff on GitHub as
is usually done in changelogs since `embassy` is a mono-repo and the GH
UI doesn't offer a commit view per folder (see the [GH feature request]
for this).
[`cargo-release`]: https://crates.io/crates/cargo-release
[GH feature request]: https://github.com/orgs/community/discussions/162131
this requires you to install [`cargo-release`].
note that this does not include a URL pointing to the diff on GitHub as
is usually done in changelogs since `embassy` is a mono-repo and the GH
UI doesn't offer a commit view per folder (see the [GH feature request]
for this).
[`cargo-release`]: https://crates.io/crates/cargo-release
[GH feature request]: https://github.com/orgs/community/discussions/162131
this requires you to install [`cargo-release`].
note that this does not include a URL pointing to the diff on GitHub as
is usually done in changelogs since `embassy` is a mono-repo and the GH
UI doesn't offer a commit view per folder (see the [GH feature request]
for this).
[`cargo-release`]: https://crates.io/crates/cargo-release
[GH feature request]: https://github.com/orgs/community/discussions/162131