commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
a2b783b0d03257db3c743fcfcac719244be1aac9 | Tamo | 2022-08-30T10:02:42 | Update src/bitmap/multiops.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index ed9e4951..5643fd97 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -446,7 +446,6 @@ where
}
let mut ret = Vec::with_capacity(to_collect);
-
for el in iter.take(to_collect) {
ret.push(el?);
} | 1 | 0 | 1 |
4a2bf6bc05d68b77c0cede2db485d5b7f3e42b87 | Irevoire | 2022-08-30T09:34:44 | pre-allocate the vec storing the starting elements | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 50267bad..ed9e4951 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -120,7 +120,7 @@ fn try_multi_and_owned<E>(
// We're going to take a bunch of elements at the start of the iterator and sort
// them to reduce the size of... | 1 | 15 | 9 |
b7153e0a3539d6db4a35043c26f6e208c6505def | Irevoire | 2022-08-30T09:31:43 | fix the benchmarks | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index b8301eef..d12d67b3 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -8,7 +8,7 @@ use criterion::{
Throughput,
};
-use roaring::{IterExt, RoaringBitmap};
+use roaring::{MultiOps, RoaringBitmap};
use crate::datase... | 1 | 5 | 5 |
d6192a3408a8113fc14d8ab690f453adc421c6f4 | Irevoire | 2022-08-30T09:16:03 | rename the internal ops in the treemap | diff --git a/src/treemap/multiops.rs b/src/treemap/multiops.rs
index f69f3746..4ad2a8e2 100644
--- a/src/treemap/multiops.rs
+++ b/src/treemap/multiops.rs
@@ -14,28 +14,28 @@ where
type Output = RoaringTreemap;
fn union(self) -> Self::Output {
- try_simple_multi_op_owned::<_, _, OrOp>(
+ try_s... | 1 | 24 | 24 |
8ffbe734fa5116278bf4f03d1b0eb17965954d2c | Irevoire | 2022-08-30T09:11:03 | change an if to a match stmt | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 64f0179a..50267bad 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -317,15 +317,18 @@ fn try_multi_or_ref<'a, E: 'a>(
start.sort_unstable_by_key(|bitmap| Reverse(bitmap.containers.len()));
let mut start = start.into_iter(... | 1 | 11 | 8 |
00484b75b886c1ce54e576030c5f0233146d7348 | Tamo | 2022-08-30T08:56:54 | Apply suggestions from code review
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index a3caa2bd..64f0179a 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -12,7 +12,7 @@ use crate::{MultiOps, RoaringBitmap};
use super::{container::Container, store::Store};
-/// When collecting bitmaps for optimizing the computation... | 3 | 13 | 10 |
5af1213a297215e5de6b532844e0e1a15539fbda | Tamo | 2022-08-29T15:13:28 | rename all the ops | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 74b244b2..a3caa2bd 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -26,19 +26,19 @@ where
{
type Output = RoaringBitmap;
- fn or(self) -> Self::Output {
+ fn union(self) -> Self::Output {
try_multi_or_owned(sel... | 5 | 61 | 61 |
6f086eaadb6197895675c5762ef657fad74e90c2 | Tamo | 2022-08-29T15:05:19 | rename the trait and add a little bit of documentation | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 72840ba3..74b244b2 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -8,7 +8,7 @@ use std::{
use retain_mut::RetainMut;
-use crate::{IterExt, RoaringBitmap};
+use crate::{MultiOps, RoaringBitmap};
use super::{container::Contain... | 5 | 36 | 15 |
f0d6414a53a90ddd6dad703b08214d72b434b9c2 | Tamo | 2022-08-24T15:52:10 | add a few comments | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index cc9c045c..72840ba3 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -117,10 +117,13 @@ fn try_multi_and_owned<E>(
bitmaps: impl IntoIterator<Item = Result<RoaringBitmap, E>>,
) -> Result<RoaringBitmap, E> {
let mut iter = b... | 1 | 13 | 4 |
d6cdac9b9e66513b49a9900257a544eb2393dd20 | Tamo | 2022-08-24T15:25:39 | slightly improve the or | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 52442483..cc9c045c 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -1,5 +1,6 @@
use std::{
borrow::Cow,
+ cmp::Reverse,
convert::Infallible,
mem,
ops::{BitOrAssign, BitXorAssign},
@@ -214,18 +215,19 @@ fn try_... | 1 | 26 | 23 |
69d0ae73cd4193eb8da9613b06f46aeca3a49ec5 | Tamo | 2022-08-24T12:41:55 | improve the AND performances | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index ea0234af..52442483 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -118,8 +118,9 @@ fn try_multi_and_owned<E>(
let mut iter = bitmaps.into_iter();
let mut start = collect_starting_elements::<_, Result<Vec<_>, _>>(iter.by_re... | 1 | 6 | 5 |
8f31ef86d7725a41e2e6cf0672bc44cd11241e20 | Irevoire | 2022-08-22T15:25:43 | specialize or and xor | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index caa50bc5..ea0234af 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -72,10 +72,7 @@ where
type Output = RoaringBitmap;
fn or(self) -> Self::Output {
- try_naive_lazy_multi_op_ref(self.into_iter().map(Ok::<_, Infalli... | 1 | 106 | 48 |
aea31a8d0e63eafdae0059b467c0feb5f2a774cf | Irevoire | 2022-08-22T13:30:56 | specific impl for the xor owned | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 41563638..caa50bc5 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -11,6 +11,14 @@ use crate::{IterExt, RoaringBitmap};
use super::{container::Container, store::Store};
+/// When collecting bitmaps for optimizing the computation... | 1 | 81 | 28 |
03d1df87f15ac856e513abe01b9b1b4e58f2b77a | Irevoire | 2022-08-22T11:32:53 | rename the simple_multi_op to sub | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 815bb332..41563638 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -2,7 +2,7 @@ use std::{
borrow::Cow,
convert::Infallible,
mem,
- ops::{BitAndAssign, BitOrAssign, BitXorAssign, SubAssign},
+ ops::{BitOrAssign, ... | 1 | 9 | 17 |
6ed6addb65adeae036c0e2d127b84cbeb19e914f | Irevoire | 2022-08-22T11:29:47 | make a specific implementation for the and | diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
index 01065b9d..815bb332 100644
--- a/src/bitmap/multiops.rs
+++ b/src/bitmap/multiops.rs
@@ -25,10 +25,7 @@ where
}
fn and(self) -> Self::Output {
- try_simple_multi_op_owned(self.into_iter().map(Ok::<_, Infallible>), |a, b| {
- ... | 2 | 62 | 11 |
ea3ae5dffead0d936e1fb8fc7739c8ea397353f9 | Irevoire | 2022-08-19T12:09:44 | move the multiop to a different module | diff --git a/src/bitmap/mod.rs b/src/bitmap/mod.rs
index f99f73eb..8eac5b8c 100644
--- a/src/bitmap/mod.rs
+++ b/src/bitmap/mod.rs
@@ -1,6 +1,7 @@
mod arbitrary;
mod container;
mod fmt;
+mod multiops;
mod proptests;
mod store;
mod util;
diff --git a/src/bitmap/multiops.rs b/src/bitmap/multiops.rs
new file mode 10... | 6 | 658 | 648 |
ea2ba1e3540f5aebf1a4075107627f9dcba89e71 | Irevoire | 2022-08-19T11:18:25 | shortcut the sub and and | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 2592b743..fad7b2bd 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -571,7 +571,12 @@ fn try_simple_multi_op_owned<E>(
let mut iter = bitmaps.into_iter();
match iter.next().transpose()? {
Some(mut lhs) => {
- iter.try_for_ea... | 1 | 13 | 2 |
95ba91b3b0c14cf792f363ef8efe80f2404f77e9 | Irevoire | 2022-08-18T17:17:17 | rename `Bitmap` to `Output` | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 9a6aaa92..2592b743 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -445,9 +445,9 @@ impl<I> IterExt<RoaringBitmap> for I
where
I: IntoIterator<Item = RoaringBitmap>,
{
- type Bitmap = RoaringBitmap;
+ type Output = RoaringBitmap;
- fn ... | 3 | 45 | 45 |
73925bb26373bb2810c3fdb3910357ef9fdce0f8 | Irevoire | 2022-08-18T15:43:57 | implement the IterExt trait on results | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 2a59f32c..9a6aaa92 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -448,19 +448,58 @@ where
type Bitmap = RoaringBitmap;
fn or(self) -> Self::Bitmap {
- naive_lazy_multi_op_owned(self, |a, b| BitOrAssign::bitor_assign(a, b))
+ ... | 2 | 211 | 61 |
5dc35ce739e5143ac4f96754caa2802b852f9d23 | Radu Berinde | 2022-08-13T15:55:39 | Implement FromIter for &u64 for treemap | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index e1a1bd05..cedece31 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -238,6 +238,14 @@ impl FromIterator<u64> for RoaringTreemap {
}
}
+impl<'a> FromIterator<&'a u64> for RoaringTreemap {
+ fn from_iter<I: IntoIterator<Item = &'a u64>>(... | 2 | 26 | 0 |
5cc001d7fefe1f0394eb8164908d157f168a4a68 | Radu Berinde | 2022-08-13T15:54:04 | Implement FromIter for &u32 | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index 6af0ab11..36098729 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -139,6 +139,14 @@ impl FromIterator<u32> for RoaringBitmap {
}
}
+impl<'a> FromIterator<&'a u32> for RoaringBitmap {
+ fn from_iter<I: IntoIterator<Item = &'a u32>>(iterat... | 2 | 26 | 2 |
5d8627c057453b28216a6397f9d13e40ac5cfe6d | Radu Berinde | 2022-08-10T22:00:10 | Branchless array-bitmap operations
This commit implements a faster version of `Vec::retain` for array
stores.
Fixes #206. | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index c8747075..dbfb6dfa 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -205,6 +205,23 @@ impl ArrayStore {
pub fn as_slice(&self) -> &[u16] {
&self.vec
}
+
+ /// R... | 1 | 25 | 8 |
1c7b06d34e7e77c32e933b09ddc234eeba62f9cf | Kerollmops | 2022-07-28T10:45:59 | Make most of the simd generic functions non-generic | diff --git a/src/bitmap/store/array_store/vector.rs b/src/bitmap/store/array_store/vector.rs
index 7607c688..14f3f035 100644
--- a/src/bitmap/store/array_store/vector.rs
+++ b/src/bitmap/store/array_store/vector.rs
@@ -12,8 +12,8 @@
use super::scalar;
use core::simd::{
- mask16x8, simd_swizzle, u16x8, LaneCount,... | 1 | 28 | 31 |
bdef55ee7efdb8053fbe68f46cb0311870e06ded | tonyabracadabra | 2022-07-26T18:24:42 | chore: bump simd nightly | diff --git a/src/bitmap/store/array_store/vector.rs b/src/bitmap/store/array_store/vector.rs
index d63550eb..7607c688 100644
--- a/src/bitmap/store/array_store/vector.rs
+++ b/src/bitmap/store/array_store/vector.rs
@@ -13,7 +13,7 @@
use super::scalar;
use core::simd::{
mask16x8, simd_swizzle, u16x8, LaneCount, M... | 1 | 14 | 14 |
9c68ae30bd252df58160e89f914b78478afb7c9d | Tamo | 2022-07-04T13:23:12 | make clippy happy | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 2c21672f..4b0e4239 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -499,9 +499,7 @@ where
let current_bitmap = treemap.map.remove(&k).unwrap();
let new_bitmap =
O::op_owned(std::iter::once(current_bitmap).chain(
- ... | 1 | 1 | 3 |
529297a8810f0f4ab29b9d7bf54f5a3d75c17324 | Irevoire | 2022-07-01T17:01:32 | fix and add some benchmarks | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 3aa584cb..b8301eef 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -470,6 +470,18 @@ fn successive_and(c: &mut Criterion) {
BatchSize::LargeInput,
);
});
+
+ group.bench_funct... | 1 | 26 | 127 |
6b5d9fb48d418961363749bd3e169f23e50cdbf5 | Irevoire | 2022-07-01T09:30:28 | remove the contsraint on the implementation of the IterExt trait | diff --git a/src/lib.rs b/src/lib.rs
index f2bbe51d..57032694 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -50,13 +50,7 @@ impl Error for NonSortedIntegers {}
/// An [`IntoIterator`] blanket implementation that provides extra methods for [`RoaringBitmap`]
/// and [`RoaringTreemap`]
-///
-/// This trait is parameteri... | 1 | 1 | 17 |
570fc74b36b333bbe8be07c44e7547b2842ccd5a | Tamo | 2022-06-30T14:44:36 | Fix the multiop | diff --git a/src/treemap/arbitrary.rs b/src/treemap/arbitrary.rs
index a07f414d..c7adb7d5 100644
--- a/src/treemap/arbitrary.rs
+++ b/src/treemap/arbitrary.rs
@@ -9,7 +9,7 @@ mod test {
pub fn arbitrary()(map in btree_map(0u32..=16, RoaringBitmap::arbitrary(), 0usize..=16)) -> RoaringTreemap {
... | 2 | 70 | 7 |
9b8e9d3c1b23f78c817b87ed8a2a36f3abb8dcc4 | Irevoire | 2022-06-29T08:21:59 | improve the tests | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index 2df9edf8..c8747075 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -12,7 +12,6 @@ use std::ops::{BitAnd, BitAndAssign, BitOr, BitXor, RangeInclusive, Sub, SubAssi
use super::bitmap... | 2 | 3 | 1 |
31d8d586097ff9e597b597ab3625233160c7f50a | Irevoire | 2022-06-29T05:08:29 | Reduce the amount of code related to treemaps multiops
Co-authored-by: Clément Renault <clement@meilisearch.com> | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index b77fa9fd..844f0ff9 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -410,378 +410,203 @@ where
type Bitmap = RoaringTreemap;
fn or(self) -> Self::Bitmap {
- let mut heap: BinaryHeap<_> = self
- .into_iter()
- ... | 1 | 148 | 323 |
b164cce1a311c7e1285b46114a59e2abc7c26edd | Tamo | 2022-06-23T14:35:11 | improve the tests slightly | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 7949060c..2a59f32c 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -671,13 +671,11 @@ mod test {
b in RoaringBitmap::arbitrary(),
c in RoaringBitmap::arbitrary()
) {
- let mut ref_assign = RoaringBitmap::new... | 2 | 4 | 8 |
b6d543e57bae272879a292c72d731f6fcaa9a98b | Tamo | 2022-06-23T14:27:33 | implements a first version with a lot of copy pasting | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 49266096..adf68a16 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -456,15 +456,141 @@ where
}
fn and(self) -> Self::Bitmap {
- todo!()
+ let mut heap: BinaryHeap<_> = self
+ .into_iter()
+ .filter_map... | 1 | 301 | 7 |
ebeaf3a91b905996e36bb500da7c37c3c4384324 | Tamo | 2022-06-23T10:12:27 | fix the arbitrary impl | diff --git a/src/bitmap/arbitrary.rs b/src/bitmap/arbitrary.rs
index 8664c729..a1fabdab 100644
--- a/src/bitmap/arbitrary.rs
+++ b/src/bitmap/arbitrary.rs
@@ -2,7 +2,7 @@
mod test {
use crate::bitmap::container::Container;
use crate::bitmap::store::{ArrayStore, BitmapStore, Store};
- use crate::{RoaringBi... | 4 | 16 | 15 |
b0aef392f8c050b0ccebf6080cfa8edbdbfdaa93 | Tamo | 2022-06-23T09:20:35 | add tests | diff --git a/Cargo.toml b/Cargo.toml
index 3c59f6de..ebf4eadb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,6 +25,7 @@ simd = []
[dev-dependencies]
proptest = { version = "1.0.0" }
+arbitrary = { version = "1", features = ["derive"] }
[profile.test]
opt-level = 2
diff --git a/src/bitmap/arbitrary.rs b/src/bit... | 4 | 160 | 1 |
d2a55ae6781bf546b6a34d6cc75290b380195d3f | Tamo | 2022-06-22T15:36:58 | add tests to the new bitmap operations | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index fdb57bd4..7949060c 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -628,7 +628,7 @@ fn naive_lazy_multi_op_ref<'a>(
#[cfg(test)]
mod test {
- use crate::RoaringBitmap;
+ use crate::{IterExt, RoaringBitmap};
use proptest::prelude::*;
... | 1 | 103 | 1 |
9645524e1ecfe579508e85835c0cdad4fb54168d | Kerollmops | 2022-03-09T16:40:14 | Implement the first Roaring Treemap multi op | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 802d5b0a..dbf58cbb 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -1,8 +1,12 @@
+use std::borrow::Borrow;
+use std::cmp::Ordering;
+use std::collections::binary_heap::PeekMut;
use std::collections::btree_map::Entry;
+use std::collections::{BTreeMa... | 1 | 74 | 2 |
4cac9528d48d9dca3d65b2de7a557cbf08b32af3 | Kerollmops | 2022-03-09T10:37:06 | Use the RetainMut fully qualified syntax | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 9972ebd0..fdb57bd4 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -545,7 +545,7 @@ fn naive_lazy_multi_op_owned(
}
}
- containers.retain_mut(|container| {
+ RetainMut::retain_mut(&mut containers, |container| {
container.e... | 1 | 1 | 1 |
2702150c49dc54846d4a786765b6d77c58586ed5 | saik0 | 2022-01-12T22:49:20 | add iter ops | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 4c4b1abe..3aa584cb 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -8,7 +8,7 @@ use criterion::{
Throughput,
};
-use roaring::RoaringBitmap;
+use roaring::{IterExt, RoaringBitmap};
use crate::datasets::Datasets... | 5 | 404 | 4 |
6009ab663615185d90d2b7e7b59d04e7b470f17b | Kerollmops | 2022-06-28T09:48:36 | Use retain_mut 0.1.7 to avoid warnings | diff --git a/Cargo.toml b/Cargo.toml
index e2c8b628..3c59f6de 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
bytemuck = "1.7.3"
byteorder = "1.4.3"
-retain_mut = "0.1.6"
+retain_mut = "=0.1.7"
[features]
simd = [] | 1 | 1 | 1 |
59aa5b93b16bf2377d34efc16ad74039bd66a895 | Kerollmops | 2022-06-28T09:36:19 | Fix the benchmarks datasets git URL format | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index f93d9d0f..7e5d26e0 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -11,7 +11,7 @@ roaring = { path = ".." }
[dev-dependencies]
once_cell = "1.9"
-git2 = { version = "0.13", default-features = false, features = ["vendored-openssl"] }
... | 2 | 2 | 2 |
ef4ada2b7a88e0d90204e4edb2a20b679a819a96 | Zachary Dremann | 2022-03-11T04:08:35 | Optimize insert_range for large ranges
In the case where we're inserting enough that we know it will end up too
large to store as an array, convert to a bitmap before adding the range
This leads to some quite large speed ups for large range insertions | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 5e76f3bb..d260270b 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -40,6 +40,12 @@ impl Container {
}
pub fn insert_range(&mut self, range: RangeInclusive<u16>) -> u64 {
+ // If inserting the range will make th... | 1 | 6 | 0 |
13891fef5eb8797c33bb9b5c1ffe35527d5f7f40 | Sheyne Anderson | 2022-03-02T17:40:36 | Fix bound in documentation of the select function | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index de1c421f..7ee5744d 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -391,7 +391,7 @@ impl RoaringBitmap {
}
}
- /// Returns the `n`th integer in the set or `None` if `n <= len()`
+ /// Returns the `n`th integer i... | 1 | 1 | 1 |
76620ca5713a931116aec8de38a1ae8bc1def1eb | saik0 | 2022-02-26T19:01:38 | replace portable-simd create with core::simd | diff --git a/Cargo.toml b/Cargo.toml
index 967f53ae..3313ad26 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,9 @@ license = "MIT OR Apache-2.0"
bytemuck = "1.7.3"
byteorder = "1.4.3"
retain_mut = "0.1.6"
-simd = { git = "https://github.com/rust-lang/portable-simd", package = "core_simd", optional = true }
+
+... | 3 | 16 | 11 |
60375cd569b50e9eca646eef2830a47c13bc33e5 | Kerollmops | 2022-02-24T19:23:52 | Bump the version to 0.9.0 | diff --git a/Cargo.toml b/Cargo.toml
index 967f53ae..c5df718f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "roaring"
-version = "0.8.1"
+version = "0.9.0"
rust-version = "1.56.1"
authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
description = "https://roar... | 1 | 1 | 1 |
33e1d29cd6f293515ad8d7990be1229de13ea263 | Jay Schmidek | 2022-02-14T17:06:14 | Fix off by one iterator problem | diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs
index 88c4f1a1..b23f2003 100644
--- a/src/bitmap/store/bitmap_store.rs
+++ b/src/bitmap/store/bitmap_store.rs
@@ -304,7 +304,7 @@ impl<B: Borrow<[u64; BITMAP_LENGTH]>> BitmapIter<B> {
BitmapIter {
key: 0,
... | 2 | 4 | 4 |
ff61d5d797b559aa035d172cf7101c9cea263ee2 | Jay | 2022-02-13T19:00:50 | Use anonymous lifetimes
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 6b9d3f74..939d6462 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -243,7 +243,7 @@ impl<'a> Iterator for Iter<'a> {
}
}
-impl<'a> DoubleEndedIterator for Iter<'a> {
+impl DoubleEndedIterator for Iter<'_> {
fn next_b... | 3 | 4 | 4 |
8adfb18d4c59965d0338a04c12edbb96fc7a0e34 | Jay Schmidek | 2022-02-13T05:23:56 | Add benches for iter().rev() and into_iter().rev() | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 85154a13..7ce40be9 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -319,6 +319,26 @@ fn iteration(c: &mut Criterion) {
BatchSize::SmallInput,
);
});
+
+ group.bench_function(B... | 1 | 20 | 0 |
702b1386772783bf8eb41009bcd193d675427c2e | Jay Schmidek | 2022-02-12T05:52:02 | Simplify tests | diff --git a/tests/iter.rs b/tests/iter.rs
index e23ebf26..de103aad 100644
--- a/tests/iter.rs
+++ b/tests/iter.rs
@@ -53,58 +53,92 @@ fn bitmaps() {
assert_eq!(clone2, original);
}
+proptest! {
+ #[test]
+ fn iter(values in btree_set(any::<u32>(), ..=10_000)) {
+ let bitmap = RoaringBitmap::from_s... | 2 | 113 | 82 |
4d472dc1c203b998f1afc4096b2e02462bf52541 | Jay Schmidek | 2022-02-11T23:20:05 | Implement DoubleEndedIterator for RoaringTreemap | diff --git a/src/treemap/iter.rs b/src/treemap/iter.rs
index 3cf59c85..be9e34be 100644
--- a/src/treemap/iter.rs
+++ b/src/treemap/iter.rs
@@ -19,6 +19,12 @@ impl<'a> Iterator for To64Iter<'a> {
}
}
+impl<'a> DoubleEndedIterator for To64Iter<'a> {
+ fn next_back(&mut self) -> Option<Self::Item> {
+ se... | 2 | 83 | 0 |
7e1b4c916edb04c2399d73d4c4a4130e89c77679 | Jay Schmidek | 2022-02-11T23:07:31 | Simplify comparison | diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs
index 88459c54..102a28a2 100644
--- a/src/bitmap/store/bitmap_store.rs
+++ b/src/bitmap/store/bitmap_store.rs
@@ -1,4 +1,5 @@
use std::borrow::Borrow;
+use std::cmp::Ordering;
use std::fmt::{Display, Formatter};
use std::ops::{BitAndAss... | 1 | 6 | 5 |
1e7c5e00f3366bdf6a39fbd0915597c88bbd1985 | Jay Schmidek | 2022-02-11T23:01:55 | Remove unnecessary branch | diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs
index 9f370b0d..88459c54 100644
--- a/src/bitmap/store/bitmap_store.rs
+++ b/src/bitmap/store/bitmap_store.rs
@@ -344,11 +344,7 @@ impl<B: Borrow<[u64; BITMAP_LENGTH]>> DoubleEndedIterator for BitmapIter<B> {
return No... | 2 | 19 | 5 |
81f49f2c1bce29364493ed512d82fa425f676f52 | saik0 | 2022-02-11T14:11:10 | remove in place xor operation | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index 32ec08da..c8747075 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -7,7 +7,7 @@ use std::cmp::Ordering;
use std::cmp::Ordering::*;
use std::convert::{TryFrom, TryInto};
use std::... | 2 | 11 | 49 |
33d60275f515f6b1c8b879366b06633ac8d2a09f | saik0 | 2022-02-11T12:44:56 | use pairs in treemap intersection length | diff --git a/src/treemap/cmp.rs b/src/treemap/cmp.rs
index 8b6a0aa4..c55fd228 100644
--- a/src/treemap/cmp.rs
+++ b/src/treemap/cmp.rs
@@ -4,13 +4,13 @@ use std::iter::Peekable;
use crate::RoaringBitmap;
use crate::RoaringTreemap;
-struct Pairs<'a>(
+pub(crate) struct Pairs<'a>(
Peekable<btree_map::Iter<'a, u3... | 2 | 10 | 18 |
893daeb61fedd5b5aad3d763fd8b2699d63fea35 | saik0 | 2022-02-11T12:44:23 | prefer add zero over panic when encouting pair of none in pairs | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 74402f6c..fa19ad47 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -31,7 +31,7 @@ impl RoaringBitmap {
(Some(..), None) => 0,
(None, Some(..)) => 0,
(Some(lhs), Some(rhs)) => lhs.intersection_len(rhs),
... | 1 | 1 | 1 |
87fce97fe4b6e79f7573d89ecbd19facdde2fde0 | Joel Pedraza | 2022-02-11T12:30:54 | Update src/treemap/ops.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 419a301b..f57f9838 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -231,7 +231,7 @@ impl RoaringTreemap {
self.len() - self.intersection_len(other)
}
- /// Computes the len of the symmetric difference with the specified other bitm... | 1 | 1 | 1 |
32f2963b1ce89e45f17291a0d372706de66d9b1c | Joel Pedraza | 2022-02-11T12:30:45 | Update src/treemap/ops.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index c9ea82dc..419a301b 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -162,10 +162,10 @@ impl RoaringTreemap {
/// # Examples
///
/// ```rust
- /// use roaring::RoaringBitmap;
+ /// use roaring::RoaringTreemap;
///
- /// le... | 1 | 3 | 3 |
65a9dd5dc0e9edfc0b4f13cda44664a80d9956f1 | saik0 | 2022-02-11T12:18:35 | rename deserialize_from_unvalidated to deserialize_unchecked_from | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index f6cd6fa6..26bb7e9b 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -382,10 +382,10 @@ fn deserialization(c: &mut Criterion) {
});
});
- group.bench_function(BenchmarkId::new("deserialize_fro... | 3 | 8 | 8 |
16dbd0ea13264b6a8e7c7f36019c3dadf8c9f58b | saik0 | 2022-02-11T11:37:37 | rename deserialize_from_unvalidated to deserialize_from_unchecked | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index ea1ed69a..f6cd6fa6 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -382,18 +382,13 @@ fn deserialization(c: &mut Criterion) {
});
});
- group.bench_function(
- BenchmarkId::new("d... | 3 | 13 | 18 |
63e42e86ae912a6ca1d2a357967071122b6aff43 | saik0 | 2022-02-11T11:34:05 | remove deprecated set op methods | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 54b5a951..7d3e3248 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -7,156 +7,6 @@ use crate::bitmap::container::Container;
use crate::bitmap::Pairs;
use crate::RoaringBitmap;
-impl RoaringBitmap {
- /// Unions in-place with the specified other bi... | 2 | 0 | 300 |
4c53d49fd6cb734a1370238d743e4b339f577754 | saik0 | 2022-02-11T10:57:31 | specify None return cases for select | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index aad59318..de1c421f 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -391,7 +391,7 @@ impl RoaringBitmap {
}
}
- /// Returns the nth integer in the bitmap (if the set is non-empty)
+ /// Returns the `n`th integer ... | 2 | 5 | 8 |
a9e4a0aa3ce5c3bb523076d49ca096bbf56b3ce8 | saik0 | 2022-02-11T10:42:53 | rename deserialize_from_unvalidated to deserialize_from_nonvalidating | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 85154a13..ea1ed69a 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -383,12 +383,12 @@ fn deserialization(c: &mut Criterion) {
});
group.bench_function(
- BenchmarkId::new("deserialize_from_u... | 3 | 8 | 8 |
d1eae58942d25db8a70edb83b67725cde9c672b4 | Jay Schmidek | 2022-02-09T05:56:30 | impl DoubleEndedIterator | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 2eb7631e..6b9d3f74 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -243,6 +243,12 @@ impl<'a> Iterator for Iter<'a> {
}
}
+impl<'a> DoubleEndedIterator for Iter<'a> {
+ fn next_back(&mut self) -> Option<Self::Item> {
+... | 5 | 100 | 3 |
0144014821bf2d20b34efab96bff783e494b7d76 | saik0 | 2022-02-10T07:02:56 | add fast counts benchmarks | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 85154a13..771dae2c 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -24,6 +24,7 @@ fn pairwise_binary_op_matrix(
op_ref_ref: impl Fn(&RoaringBitmap, &RoaringBitmap) -> RoaringBitmap,
mut op_assign_owned: impl FnM... | 1 | 13 | 0 |
fe47b0556adb422fa3e45752c265268cbb6ff427 | saik0 | 2022-02-10T02:14:50 | bump rust edition to 2021 | diff --git a/Cargo.toml b/Cargo.toml
index b036f1c1..29027f4a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ repository = "https://github.com/RoaringBitmap/roaring-rs"
readme = "README.md"
keywords = ["roaring", "data-structure", "bitmap"]
categories = ["data-structures"]
-edition = "2018"
+edition = "20... | 2 | 2 | 2 |
a8bc5227196fb701b30301918d15e27e2b1aa76d | saik0 | 2022-02-10T02:07:18 | remove minor ver from itertools build-dep | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index be3d3e58..4e9ec9e6 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -15,7 +15,7 @@ git2 = { version = "0.13", default-features = false, features = ["vendored-opens
zip = { version = "0.5", default-features = false, features = ["deflate"]... | 1 | 1 | 1 |
4f152cf0f42255add00f4fbfcd58173b80e84d69 | saik0 | 2022-02-10T02:05:00 | bump direct dependency minor versions | diff --git a/Cargo.toml b/Cargo.toml
index b036f1c1..0ba2487c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,9 +16,9 @@ edition = "2018"
license = "MIT OR Apache-2.0"
[dependencies]
-bytemuck = "1.7.2"
+bytemuck = "1.7.3"
byteorder = "1.4.3"
-retain_mut = "0.1.4"
+retain_mut = "0.1.6"
simd = { git = "https://git... | 1 | 2 | 2 |
b394d89d10e1f6de946393b91e926e0055c9d45c | saik0 | 2022-02-10T01:33:33 | allow warning to allow for different clippy versions | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index 930b3ded..85154a13 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -224,11 +224,12 @@ fn select(c: &mut Criterion) {
}
}
+#[allow(clippy::redundant_closure)]
fn and(c: &mut Criterion) {
pairwise_binary_op_ma... | 1 | 7 | 3 |
8a70f7e7b6c109a191f587892542acd45187a07b | saik0 | 2022-02-10T01:15:28 | address clippy lints for benchmarks | diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs
index f00cc244..930b3ded 100644
--- a/benchmarks/benches/lib.rs
+++ b/benchmarks/benches/lib.rs
@@ -14,6 +14,7 @@ use crate::datasets::Datasets;
mod datasets;
+#[allow(clippy::too_many_arguments)]
fn pairwise_binary_op_matrix(
c: &mut Criteri... | 1 | 5 | 4 |
a60e94176ec3d67180e83cbbfbd33e82242b33df | saik0 | 2022-02-10T00:10:29 | add benchmarks using real datasets | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index 5fa81514..be3d3e58 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -15,6 +15,7 @@ git2 = { version = "0.13", default-features = false, features = ["vendored-opens
zip = { version = "0.5", default-features = false, features = ["deflate"]... | 2 | 434 | 271 |
dbfe350c0bb1256ce02a724246a8868b29a15bb8 | Joel Pedraza | 2022-02-09T14:32:21 | Update benchmarks/benches/datasets.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/benchmarks/benches/datasets.rs b/benchmarks/benches/datasets.rs
index 392ae211..3dd6d9a6 100644
--- a/benchmarks/benches/datasets.rs
+++ b/benchmarks/benches/datasets.rs
@@ -84,7 +84,7 @@ fn init_datasets() -> Result<PathBuf, Box<dyn std::error::Error>> {
.progress_chars("#> "),
... | 1 | 1 | 1 |
b99c44523b179696da3d750192526eb7b6840968 | saik0 | 2022-02-09T13:37:14 | add vendored ssl to git deps | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index 6c5ea887..5fa81514 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -11,7 +11,7 @@ roaring = { path = ".." }
[dev-dependencies]
once_cell = "1.9"
-git2 = { version = "0.13", default-features = false }
+git2 = { version = "0.13", defau... | 1 | 1 | 1 |
e8469831a2baacffd946838398ef487f04084090 | saik0 | 2022-02-09T11:13:23 | remove benchmark src dir | diff --git a/benchmarks/src/lib.rs b/benchmarks/src/lib.rs
deleted file mode 100644
index 829adafa..00000000
--- a/benchmarks/src/lib.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-//! This library is only used to isolate the benchmarks
-//! from the original roaring library.
-//!
-//! It does not include interesting functions for ... | 1 | 0 | 5 |
1f6cc64116b858b6123b6dff863898ffd7b7998f | saik0 | 2022-02-09T10:06:46 | remove datasets_paths.rs file | diff --git a/benchmarks/benches/datasets_paths.rs b/benchmarks/benches/datasets_paths.rs
deleted file mode 100644
index ca4f3a28..00000000
--- a/benchmarks/benches/datasets_paths.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-// This file is generated by the build script.
-// Do not modify by hand, use the build.rs file.
-
-pub con... | 1 | 0 | 4 |
7da34b7384e61d12b12a7fd851ff779928eade93 | saik0 | 2022-02-09T10:05:21 | fix benchmark warnings | diff --git a/benchmarks/benches/datasets_paths.rs b/benchmarks/benches/datasets_paths.rs
new file mode 100644
index 00000000..ca4f3a28
--- /dev/null
+++ b/benchmarks/benches/datasets_paths.rs
@@ -0,0 +1,4 @@
+// This file is generated by the build script.
+// Do not modify by hand, use the build.rs file.
+
+pub const W... | 2 | 5 | 4 |
37c10a38f486258b3a74493219f2fc0ea97194b4 | saik0 | 2022-02-09T10:05:04 | cleanup benchmark dependencies | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index e82fb9f8..6c5ea887 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -10,13 +10,11 @@ publish = false
roaring = { path = ".." }
[dev-dependencies]
-once_cell = "1.9.0"
-git2 = "0.13.25"
-zip = "0.5.13"
-indicatif = "0.16.2"
+once_cell ... | 1 | 4 | 6 |
74617205bbd9e02951ddef3256b3a2ff76aab0a4 | saik0 | 2022-02-09T05:56:08 | remove build-deps and build.rs | diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index a6a5326d..e82fb9f8 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -18,13 +18,6 @@ criterion = { version = "0.3", features = ["html_reports"] }
quickcheck = "0.9"
quickcheck_macros = "0.9"
-[build-dependencies]
-anyhow = "1.0"
-bytes... | 3 | 0 | 22 |
714231dc62687b456a23bdee6a9dab625813ed66 | saik0 | 2022-02-07T17:50:45 | move deserialize_impl to bottom of RoaringTreemap (formatting) | diff --git a/src/treemap/serialization.rs b/src/treemap/serialization.rs
index 7ada2ee4..1d713e62 100644
--- a/src/treemap/serialization.rs
+++ b/src/treemap/serialization.rs
@@ -51,25 +51,6 @@ impl RoaringTreemap {
Ok(())
}
- fn deserialize_from_impl<R, F>(mut reader: R, mut deserialize_bitmap: F) -... | 1 | 19 | 19 |
01a6e3e92a92dc0cb7679b545b779f6d0f95cb87 | saik0 | 2022-02-07T17:48:46 | add deserialize_unvalidated to RoaringTreemap | diff --git a/src/treemap/serialization.rs b/src/treemap/serialization.rs
index 7e12ae88..7ada2ee4 100644
--- a/src/treemap/serialization.rs
+++ b/src/treemap/serialization.rs
@@ -51,6 +51,25 @@ impl RoaringTreemap {
Ok(())
}
+ fn deserialize_from_impl<R, F>(mut reader: R, mut deserialize_bitmap: F) -... | 1 | 45 | 12 |
11f26032184c46c9eeab79bfd7c8e05cc2ca0600 | Joel Pedraza | 2022-02-07T08:34:37 | Update src/bitmap/serialization.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index e16a9e53..69220ef4 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -139,7 +139,7 @@ impl RoaringBitmap {
/// let rb1: RoaringBitmap = (1..4).collect();
/// let mut bytes = vec![];
/// rb1.serialize_... | 1 | 1 | 1 |
021c123de017aaa7eabf778837b85977b5b06b7a | saik0 | 2022-02-07T01:32:04 | prefer flatten over flatmap identity | diff --git a/src/bitmap/iter.rs b/src/bitmap/iter.rs
index fbf56ac2..75d1fa58 100644
--- a/src/bitmap/iter.rs
+++ b/src/bitmap/iter.rs
@@ -1,4 +1,3 @@
-use std::convert::identity;
use std::iter::{self, FromIterator};
use std::{slice, vec};
@@ -7,31 +6,27 @@ use crate::{NonSortedIntegers, RoaringBitmap};
/// An i... | 1 | 4 | 9 |
a519a2a130906302c6a38e68d3a7c66640028f1b | saik0 | 2022-02-07T00:53:39 | add unvalidated deserialization | diff --git a/src/bitmap/serialization.rs b/src/bitmap/serialization.rs
index 93cd7c5c..e16a9e53 100644
--- a/src/bitmap/serialization.rs
+++ b/src/bitmap/serialization.rs
@@ -1,6 +1,7 @@
use bytemuck::cast_slice_mut;
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
-use std::convert::TryFrom;
+use std::con... | 1 | 50 | 7 |
d156ab21c4ffb9676d2b9b1e9f083e1c109370d8 | saik0 | 2022-02-07T00:25:14 | remove size hint and exact size from bitmap inner iterators | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 092c9977..2eb7631e 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -241,15 +241,6 @@ impl<'a> Iterator for Iter<'a> {
fn next(&mut self) -> Option<u32> {
self.inner.next().map(|i| util::join(self.key, i))
}
- ... | 3 | 4 | 46 |
eb1efc422f3d6cff50406452caec0acc1b0ef6b6 | saik0 | 2022-02-06T23:43:50 | revert chaning type of len in bitxor from i64 to isize | diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs
index 5a74f443..4253d635 100644
--- a/src/bitmap/store/bitmap_store.rs
+++ b/src/bitmap/store/bitmap_store.rs
@@ -422,12 +422,12 @@ impl BitXorAssign<&Self> for BitmapStore {
impl BitXorAssign<&ArrayStore> for BitmapStore {
fn bitx... | 1 | 2 | 2 |
42e75f39467e902524fbba637e6a767e54ac614d | saik0 | 2022-02-06T23:25:26 | inline op_bitmaps function in its only usage | diff --git a/src/bitmap/store/bitmap_store.rs b/src/bitmap/store/bitmap_store.rs
index d60df815..5a74f443 100644
--- a/src/bitmap/store/bitmap_store.rs
+++ b/src/bitmap/store/bitmap_store.rs
@@ -1,6 +1,6 @@
use std::borrow::Borrow;
use std::fmt::{Display, Formatter};
-use std::ops::{BitAnd, BitAndAssign, BitOrAssign,... | 1 | 2 | 7 |
cce76a88e024bc79104e7e43366be7dd4d70d502 | saik0 | 2022-02-06T23:12:33 | add treemap fast count impl and tests | diff --git a/src/treemap/ops.rs b/src/treemap/ops.rs
index 78cd3573..c9ea82dc 100644
--- a/src/treemap/ops.rs
+++ b/src/treemap/ops.rs
@@ -152,6 +152,110 @@ impl RoaringTreemap {
pub fn symmetric_difference_with(&mut self, other: &RoaringTreemap) {
BitXorAssign::bitxor_assign(self, other)
}
+
+ //... | 2 | 108 | 0 |
dd70be9bef9009ee68348e89f5c44dccc5f382c9 | saik0 | 2022-02-06T23:10:57 | reimplement cadinality of set ops in terms of cardinality of intersection | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index e15c7d3f..06c5bb1c 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -100,18 +100,6 @@ impl Container {
self.store.intersection_len(&other.store)
}
- pub fn union_len(&self, other: &Self) -> u64 {
- self.s... | 5 | 8 | 147 |
c20f3cf428187bee8c169b417be9f7e9402b8c9d | saik0 | 2022-02-06T19:19:07 | fix incorrect fast counts in intersection and difference | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index 14ec9c85..f42b5e50 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -179,6 +179,10 @@ impl ArrayStore {
visitor.into_inner()
}
+ pub fn difference_len_bitmap(&self... | 3 | 16 | 13 |
9337d3f60fbd250429fc7b1abba6a8b13a8e135b | saik0 | 2022-02-06T19:17:54 | add property tests for bitmap fast counts | diff --git a/src/bitmap/ops.rs b/src/bitmap/ops.rs
index 53bb6061..abcffc42 100644
--- a/src/bitmap/ops.rs
+++ b/src/bitmap/ops.rs
@@ -603,3 +603,44 @@ impl BitXorAssign<&RoaringBitmap> for RoaringBitmap {
}
}
}
+
+#[cfg(test)]
+mod test {
+ use crate::RoaringBitmap;
+ use proptest::prelude::*;
+
+... | 1 | 41 | 0 |
86f03baa3ceed625e637eede6f36755f7890c0d6 | saik0 | 2022-02-06T19:16:54 | add integration tests for fast counts | diff --git a/tests/ops.rs b/tests/ops.rs
index 177c93cd..a4cb40df 100644
--- a/tests/ops.rs
+++ b/tests/ops.rs
@@ -11,6 +11,7 @@ fn or() {
assert_eq!(rb3, &rb1 | rb2.clone());
assert_eq!(rb3, rb1.clone() | &rb2);
assert_eq!(rb3, rb1.clone() | rb2.clone());
+ assert_eq!(rb3.len(), rb1.union_len(&rb2));... | 1 | 4 | 0 |
d17dfc8c6f77489f433fce9cd3947d3b403403ff | saik0 | 2022-02-05T05:39:20 | use simple allocationg strategy for simd set operator assignment | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index 0cf8bc81..64d42add 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -282,11 +282,20 @@ impl BitAnd<Self> for &ArrayStore {
impl BitAndAssign<&Self> for ArrayStore {
#[allow(cli... | 1 | 58 | 31 |
64067b59b8929e127842c40d5dc389ce88627daf | saik0 | 2022-02-05T01:28:12 | add select impl and tests for RoaringTreemap | diff --git a/src/treemap/inherent.rs b/src/treemap/inherent.rs
index 924c0b19..72f1d56d 100644
--- a/src/treemap/inherent.rs
+++ b/src/treemap/inherent.rs
@@ -303,6 +303,37 @@ impl RoaringTreemap {
.unwrap_or(0)
+ iter.map(|(_, bitmap)| bitmap.len()).sum::<u64>()
}
+
+ /// Returns the ... | 2 | 75 | 0 |
ed5ce57a2f0ce1a488b0839e4b300f2700fddcc8 | Alex Touchet | 2022-02-01T04:34:06 | Change Cargo.toml field to "rust-version" | diff --git a/Cargo.toml b/Cargo.toml
index e994ce7e..b036f1c1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "roaring"
version = "0.8.1"
-rust = "1.56.1"
+rust-version = "1.56.1"
authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
description = "https://roarin... | 1 | 1 | 1 |
ad24a6f0e6971f18860a5c20ea977922dfb93d0b | Joel Pedraza | 2022-01-31T13:08:56 | Update src/bitmap/store/mod.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/store/mod.rs b/src/bitmap/store/mod.rs
index bb1dee97..fcefb3da 100644
--- a/src/bitmap/store/mod.rs
+++ b/src/bitmap/store/mod.rs
@@ -147,9 +147,9 @@ impl Store {
}
pub fn select(&self, n: u16) -> Option<u16> {
- match *self {
- Array(ref vec) => vec.select(n),
- ... | 1 | 3 | 3 |
d4b85235dce71633cb844534fe014ad97938c154 | saik0 | 2022-01-31T13:07:53 | add intersection_len, difference_len, symmetric_difference_len | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 1f8f0db8..e15c7d3f 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -96,10 +96,22 @@ impl Container {
self.len() <= other.len() && self.store.is_subset(&other.store)
}
+ pub fn intersection_len(&self, other: &Se... | 5 | 232 | 28 |
5cdf93c32ef65f7fef0f79342d4420b0141f9da6 | saik0 | 2022-01-31T11:50:00 | add select method | diff --git a/src/bitmap/inherent.rs b/src/bitmap/inherent.rs
index 52e54096..aad59318 100644
--- a/src/bitmap/inherent.rs
+++ b/src/bitmap/inherent.rs
@@ -390,6 +390,41 @@ impl RoaringBitmap {
Err(i) => self.containers[..i].iter().map(|c| c.len()).sum(),
}
}
+
+ /// Returns the nth integer... | 5 | 123 | 0 |
63f2906eaa9d31d8502dd3c62dd1a5657bd4db3f | saik0 | 2022-01-31T00:28:15 | make self.store borrow explicit | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 3c26c1fe..092c9977 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -222,7 +222,8 @@ impl<'a> IntoIterator for &'a Container {
type IntoIter = Iter<'a>;
fn into_iter(self) -> Iter<'a> {
- Iter { key: self.key, i... | 1 | 2 | 1 |
f68324f60baaff704977e6ab1f2dba854bc115c8 | saik0 | 2022-01-31T00:08:35 | add union_len method | diff --git a/src/bitmap/container.rs b/src/bitmap/container.rs
index 3c26c1fe..9ed22fde 100644
--- a/src/bitmap/container.rs
+++ b/src/bitmap/container.rs
@@ -96,6 +96,10 @@ impl Container {
self.len() <= other.len() && self.store.is_subset(&other.store)
}
+ pub fn union_len(&self, other: &Self) -> u... | 6 | 100 | 2 |
e1962bbc5ce260701980435234c9cb96a637bed9 | Joel Pedraza | 2022-01-28T22:39:33 | Update src/bitmap/store/array_store/vector.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com> | diff --git a/src/bitmap/store/array_store/vector.rs b/src/bitmap/store/array_store/vector.rs
index 170acedc..fe79836d 100644
--- a/src/bitmap/store/array_store/vector.rs
+++ b/src/bitmap/store/array_store/vector.rs
@@ -4,7 +4,7 @@
//! Prior work: Schlegel et al., Fast Sorted-Set Intersection using SIMD Instructions
/... | 1 | 1 | 1 |
63bd5630b3f1d5583b6d84950f41202d8e2a2888 | saik0 | 2022-01-28T16:28:35 | add simd xor | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index 8a982e5a..83a6fcfa 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -329,6 +329,9 @@ impl BitXor<Self> for &ArrayStore {
#[allow(clippy::suspicious_arithmetic_impl)]
... | 2 | 132 | 6 |
7c46accb8b8bab83e8e36e990a7f56ce82b2ea6c | saik0 | 2022-01-28T15:58:46 | add simd or | diff --git a/src/bitmap/store/array_store/mod.rs b/src/bitmap/store/array_store/mod.rs
index 8cce7fc2..8a982e5a 100644
--- a/src/bitmap/store/array_store/mod.rs
+++ b/src/bitmap/store/array_store/mod.rs
@@ -254,6 +254,9 @@ impl BitOr<Self> for &ArrayStore {
#[allow(clippy::suspicious_arithmetic_impl)]
... | 2 | 115 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.