Skip to content

Conversation

luizirber
Copy link
Member

Try out using roaring bitmaps as in-memory representation of hashes for MinHash. We already use roaring bitmaps in the RevIndex (to store lists of datasets containing a specific hash).

This PR mostly goes for minimal changes to make it work, but future goals are

  • optimize, this is just enough to make it work
  • serialize/deserialize directly from disk, without generating a full list of hashes (this will likely need to move away from JSON...)
  • try out for LargeMinHash too? see how bad it is

Copy link

codspeed-hq bot commented Dec 19, 2024

CodSpeed Performance Report

Merging #3444 will degrade performances by 94.34%

Comparing lirber/roaring_mh (f07cba6) with latest (f4f5187)

Summary

⚡ 1 improvements
❌ 7 regressions
✅ 13 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark latest lirber/roaring_mh Change
abund0_ani_ci0 717 µs 12,671.4 µs -94.34%
abund0_ani_ci1 736.7 µs 12,834.6 µs -94.26%
abund1_ani_ci0 938.6 µs 14,355.9 µs -93.46%
abund1_ani_ci1 960 µs 14,518.1 µs -93.39%
intersection 20.3 µs 200.1 µs -89.88%
intersection_size 18.3 µs 157.2 µs -88.36%
large intersection 10.6 ms 22.7 ms -53.27%
large intersection_size 9,302.8 µs 234.2 µs ×40

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.38%. Comparing base (f4f5187) to head (f07cba6).

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3444      +/-   ##
==========================================
+ Coverage   86.42%   92.38%   +5.95%     
==========================================
  Files         137      104      -33     
  Lines       16106    12925    -3181     
  Branches     2219     2219              
==========================================
- Hits        13920    11941    -1979     
+ Misses       1879      676    -1203     
- Partials      307      308       +1     
Flag Coverage Δ
hypothesis-py 25.43% <ø> (ø)
python 92.38% <ø> (-0.02%) ⬇️
rust ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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