-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve handling of string IEs #322
Improve handling of string IEs #322
Conversation
antoninbas
commented
Sep 29, 2023
- Use the copy built-in to copy string bytes to buffer, instead of copying bytes one-by-one with a for loop. This is more efficient (confirmed with new Benchmark functions) and more correct (in case the string includes UTF-8 characters which use more than 1 byte).
- Increase max string length from 65,534 to 65,535.
New benchmark results:
Without the use of
|
* Use the copy built-in to copy string bytes to buffer, instead of copying bytes one-by-one with a for loop. This is more efficient (confirmed with new Benchmark functions) and more correct (in case the string includes UTF-8 characters which use more than 1 byte). * Increase max string length from 65,534 to 65,535. Signed-off-by: Antonin Bas <abas@vmware.com>
5957a81
to
631df37
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #322 +/- ##
==========================================
- Coverage 73.54% 73.44% -0.11%
==========================================
Files 18 18
Lines 2786 2790 +4
==========================================
Hits 2049 2049
- Misses 572 574 +2
- Partials 165 167 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Use the copy built-in to copy string bytes to buffer, instead of copying bytes one-by-one with a for loop. This is more efficient (confirmed with new Benchmark functions) and more correct (in case the string includes UTF-8 characters which use more than 1 byte). * Increase max string length from 65,534 to 65,535 (as per the IPFIX RFC 7011). Signed-off-by: Antonin Bas <abas@vmware.com>
* Use the copy built-in to copy string bytes to buffer, instead of copying bytes one-by-one with a for loop. This is more efficient (confirmed with new Benchmark functions) and more correct (in case the string includes UTF-8 characters which use more than 1 byte). * Increase max string length from 65,534 to 65,535 (as per the IPFIX RFC 7011). Signed-off-by: Antonin Bas <abas@vmware.com>