Skip to content

Conversation

@TobiasBengtsson
Copy link
Collaborator

For optimized applications where we need to read binary data (for example calculating checksums), I propose to add a new type BinarySlice<T> along the current Binary<T> in order to avoid allocation/copying. This type can only be used as a parameter and not return value on the Rust side, since modifying the binary string is not allowed. For our usage, this improves the running time by about -20%.

Up for discussion: should we keep this in binary_slice or move it to binary?

Please let me know if there is a need for additional documentation somewhere.

@TobiasBengtsson
Copy link
Collaborator Author

@davidcole1340 hope I have fixed the fmt issues now.

@TobiasBengtsson TobiasBengtsson merged commit a404834 into extphprs:master Aug 13, 2022
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.

1 participant