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

Reusable memory for compression output #5

Open
dktapps opened this issue Feb 5, 2023 · 2 comments
Open

Reusable memory for compression output #5

dktapps opened this issue Feb 5, 2023 · 2 comments

Comments

@dktapps
Copy link
Member

dktapps commented Feb 5, 2023

compressBound often overestimates the amount of memory needed, meaning that we need to later allocate a second memory block with a smaller size than the original. However, this is very costly for large payloads. We would be able to mitigate this using a reusable memory block for compressing data.

@SOF3
Copy link
Member

SOF3 commented Feb 6, 2023

does this first compress into the reused (probably thread-local) buffer and then gets copied to a user string? might this double the memory usage in the end?

@dktapps
Copy link
Member Author

dktapps commented Feb 6, 2023

Yes, currently temporarily.

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

No branches or pull requests

2 participants