Skip to content

csp_buffer: memcpy only what is used in the packet#36

Merged
johandc merged 1 commit into
masterfrom
fast_clone_packet
Feb 17, 2026
Merged

csp_buffer: memcpy only what is used in the packet#36
johandc merged 1 commit into
masterfrom
fast_clone_packet

Conversation

@edvardxyz
Copy link
Copy Markdown

@edvardxyz edvardxyz commented Feb 17, 2026

This is faster in most cases
size is protected with if as the user could have set invalid packet length.

Test on Cortex-M0:
csp buffer size = 256
no buffer memset

packet of size 4 is 0.16 ms faster using this PR
packet of size 256 is 0.005 ms difference

This is faster in most cases
size is protected with if as the user could have set invalid packet
length.
@johandc johandc merged commit 340dd0b into master Feb 17, 2026
169 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants