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

Do not try integer packing for huge values #683

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

padix-key
Copy link
Member

Currently, pdbx.compress() will always try integer packing on an integer array. However, this may explode, if the input array has large input values, as the number of bytes per element is (value // 256) + 1 (for byte_count=1 and is_unsigned=True).
This PR fixes this by estimating the integer packing output size before trying it.

Copy link

codspeed-hq bot commented Oct 23, 2024

CodSpeed Performance Report

Merging #683 will degrade performances by 10.55%

Comparing padix-key:compress (1edfc0c) with main (53256ed)

Summary

❌ 1 (👁 1) regressions
✅ 44 untouched benchmarks

Benchmarks breakdown

Benchmark main padix-key:compress Change
👁 benchmark_compress 506 ms 565.6 ms -10.55%

@padix-key padix-key merged commit 54cd5e5 into biotite-dev:main Oct 25, 2024
27 checks passed
@padix-key padix-key deleted the compress branch November 2, 2024 15:52
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