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

[FEATURE] Unitialised resize for deserialisation #160

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

eseiler
Copy link
Member

@eseiler eseiler commented Nov 6, 2023

I ran some benchmarks with raptor.

  • uninit = with PR
  • init = without PR
  • all times in seconds

Index size: 135.5 GiB (left) and 363.2 GiB (right)

Iteration uninit init uninit init
0 138.8 253.3 247.7 676.0
1 51.5 114.2 245.9 603.8
2 49.1 109.8 146.1 256.0
3 48.6 104.9 184.2 317.4
4 48.6 104.6 246.1 280.8
5 48.6 104.4 202.0 272.2
6 48.6 104.4 204.8 273.4
7 48.6 104.7 188.9 274.7
8 48.6 104.3 187.2 274.3
9 48.6 104.2 207.5 274.4
Max 138.8 253.3 247.7 676.0
Avg 58.0 120.9 206.0 350.3
Max[2:9] 49.1 109.8 246.1 317.4
Avg[2:9] 48.7 105.2 195.8 277.9

Copy link

vercel bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hibf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2023 1:03pm

@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Nov 6, 2023
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b6d288e) 99.94% compared to head (10ad88d) 99.94%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #160   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          44       44           
  Lines        1687     1702   +15     
=======================================
+ Hits         1686     1701   +15     
  Misses          1        1           
Files Coverage Δ
...ude/hibf/hierarchical_interleaved_bloom_filter.hpp 100.00% <ø> (ø)
include/hibf/misc/bit_vector.hpp 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eseiler eseiler force-pushed the misc/cereal_voodoo branch from 67f26f7 to 10ad88d Compare November 6, 2023 13:02
@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Nov 6, 2023
@eseiler eseiler requested a review from smehringer November 6, 2023 13:09

resize_for_overwrite(vector_size);

if constexpr (cereal_text_archive<archive_t>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we ever use a text archive? I thought we cerealize in binary format?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but our cereal tests check for every archive, also text archives. In practice, I hope that a bitvector will never be serialised as json/XML :D

Comment on lines +28 to +33
auto gen = [&dist, &engine]()
{
return dist(engine);
};
seqan::hibf::bit_vector vec(size_in_bits);
std::ranges::generate(vec, gen);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto gen = [&dist, &engine]()
{
return dist(engine);
};
seqan::hibf::bit_vector vec(size_in_bits);
std::ranges::generate(vec, gen);
seqan::hibf::bit_vector vec(size_in_bits);
std::ranges::generate(vec, dist(engine));

does this not accept a temporary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not like this, dist(engine) returns a single integer, but generate wants a callable which it then calls multiple times

@eseiler eseiler merged commit c486df3 into seqan:main Nov 8, 2023
27 checks passed
@eseiler eseiler deleted the misc/cereal_voodoo branch November 8, 2023 13:09
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.

3 participants