-
Notifications
You must be signed in to change notification settings - Fork 11
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
Make Inputs handle non-aligned and non-padded buffer #276
Labels
Milestone
Comments
Tagging @V0ldek for notifications |
This is doable, but overhead has to be measured. We already have proof-of-concept code for handling the last block separately when it comes to padding. We could split off the first block and treat it separately as well. The question is how big of a performance impact this would have on small inputs, so we need some small benches to test this. |
V0ldek
added a commit
that referenced
this issue
Oct 30, 2023
- Padding and alignment is now handled automatically by the input types, allowing them to work safely without copying the entire input. The overhead is now limited to the padding, which is at most 256 bytes in total. - [`BorrowedBytes`](https://docs.rs/rsonpath-lib/0.8.4/rsonpath/input/borrowed/struct.BorrowedBytes.html) is now safe to construct. - [`OwnedBytes`](https://docs.rs/rsonpath-lib/0.8.4/rsonpath/input/owned/struct.OwnedBytes.html) no longer copies the entire source on construction. Ref: #276
Released in v0.8.4 |
V0ldek
added a commit
that referenced
this issue
Oct 30, 2023
- Padding and alignment is now handled automatically by the input types, allowing them to work safely without copying the entire input. The overhead is now limited to the padding, which is at most 256 bytes in total. - [`BorrowedBytes`](https://docs.rs/rsonpath-lib/0.8.4/rsonpath/input/borrowed/struct.BorrowedBytes.html) is now safe to construct. - [`OwnedBytes`](https://docs.rs/rsonpath-lib/0.8.4/rsonpath/input/owned/struct.OwnedBytes.html) no longer copies the entire source on construction. Ref: #276
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
For some buffer, it is impossible to padd and to aligned without performing a full copy.
The inputs layer could:
Additional context
This is useful when you don't have any control on the origin of the data: python or when your data is a substring of something else and you want to avoid copying.
The text was updated successfully, but these errors were encountered: