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

Compressed posting lists #4253

Merged
merged 2 commits into from
May 22, 2024
Merged

Compressed posting lists #4253

merged 2 commits into from
May 22, 2024

Conversation

xzfc
Copy link
Contributor

@xzfc xzfc commented May 17, 2024

#4143

This PR adds compressed posting list implementation to the sparse crate.

  • New module: index::compressed_posting_list, akin to index::posting_list.
  • A new trait PostingListIter. Both of the above implement it.
  • New modules: index/inverted_index/inverted_index_compressed_{immutable_ram,mmap} (akin to index/inverted_index/inverted_index_*).
  • Updated benchmarks. Now they compare four implementations (old ram/mmap; new ram_c/mmap_c).
  • Integration is not included.

Benchmark results

Times in milliseconds.

basic

dataset ram ram_c diff mmap mmap_c diff
random-50k 0.87684 1.1668 +33% 0.87264 1.2039 +37%
random-500k 8.0528 10.766 +33% 8.0214 10.691 +33%
neurips2023-1M 13.085 17.295 +32% 13.093 17.613 +34%
neurips2023-full-25pct 30.481 40.589 +33% 30.720 40.745 +32%
movies 4.0141 6.0397 +50% 4.1774 6.0223 +44%

hottest

dataset ram ram_c diff mmap mmap_c diff
random-50k 0.18766 0.21201 +12% 0.1876 0.21118 +12%
random-500k 1.6244 1.8405 +13% 1.6245 1.8403 +13%
neurips2023-1M 9.1040 10.591 +16% 9.1037 10.582 +16%
neurips2023-full-25pct 20.094 23.968 +19% 20.190 23.856 +18%
movies 0.20035 0.26813 +33% 0.20207 0.26778 +32%

@xzfc xzfc requested a review from generall May 20, 2024 16:24
@xzfc xzfc merged commit 93a42b4 into dev May 22, 2024
17 checks passed
@xzfc xzfc deleted the split-posting-list-3 branch May 22, 2024 18:18
generall pushed a commit that referenced this pull request May 26, 2024
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.

None yet

2 participants