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

Add small compress() benchmark #1721

Merged
merged 1 commit into from May 15, 2024
Merged

Add small compress() benchmark #1721

merged 1 commit into from May 15, 2024

Conversation

Dead2
Copy link
Member

@Dead2 Dead2 commented May 6, 2024

This minimal benchmark lets us test how long time it takes to do compress a small file.

The 1-byte compression will show the minimal time to initialize, compress and end, something we could use to calculate the maximum count we can do per second.. Lets call it COPS (Compression Operations Per Second).
The bigger sizes will spend more time doing payload compression, useful for adding some context to how much of the time is spent just doing init and end.

This PR lets us compare before/after code changes to see whether it affects COPS.

I intended to make one for decompress() as well, but never got around to it. It would need to compress multiple buffers during SetUp, to be able to do decompression on multiple sizes. It doesn't really need many different sizes though, I suggest [1, 4096, 32768]. If anyone wants to make that, I'd appreciate it.

@Dead2
Copy link
Member Author

Dead2 commented May 6, 2024

Rebased

@Dead2 Dead2 merged commit a31e6dd into develop May 15, 2024
287 of 289 checks passed
@Dead2 Dead2 deleted the compress-benchmark branch May 15, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants