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

tx: reduce memset #328

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

AlexanderYastrebov
Copy link
Contributor

  • zero only the unused rest of the block
  • use header pointer to eliminate memcpy

* zero only the unused rest of the block
* use header pointer to eliminate memcpy
@AlexanderYastrebov
Copy link
Contributor Author

AlexanderYastrebov commented Mar 15, 2024

I think there is also a potential to eliminate this mem copy:

wfb-ng/src/tx.cpp

Lines 178 to 179 in 2178edb

// FEC data
memcpy(p, buf, size);

by prepending encryption and session key buffers with radio headers but it would require changing Transmitter interface (inject_packet method).

@svpcom svpcom merged commit e8901a8 into svpcom:master Mar 15, 2024
4 checks passed
@svpcom
Copy link
Owner

svpcom commented Mar 15, 2024

I think this will not increase speed significantly but reduce code readability a lot. Anyway cpu usage even on armv6 (rpi zero) is very low.

I think there is also a potential to eliminate this mem copy:

wfb-ng/src/tx.cpp

Lines 178 to 179 in 2178edb

// FEC data
memcpy(p, buf, size);

by prepending encryption and session key buffers with radio headers but it would require changing Transmitter interface (inject_packet method).

@AlexanderYastrebov AlexanderYastrebov deleted the tx/reduce-memset branch March 15, 2024 18:26
@AlexanderYastrebov
Copy link
Contributor Author

I think there is also a potential to eliminate this mem copy

See #329

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