change bench, update numbers

This commit is contained in:
Pascal Seitz
2022-09-16 15:42:59 +08:00
parent e75472ec9a
commit 12856d80fa
2 changed files with 18 additions and 6 deletions

View File

@@ -349,10 +349,10 @@ impl CompactSpaceDecompressor {
self.params.compact_space.compact_to_u128(compact)
}
/// Comparing on compact space: 1.08 GElements/s, which equals a throughput of 17,3 Gb/s
/// (based on u128 = 16byte)
/// Comparing on compact space: Random dataset 0,24 (50% random hit) - 1.05 GElements/s
/// Comparing on compact space: Real dataset 1.08 GElements/s
///
/// Comparing on original space: .06 GElements/s (not completely optimized)
/// Comparing on original space: Real dataset .06 GElements/s (not completely optimized)
pub fn get_between_vals(&self, range: RangeInclusive<u128>) -> Vec<u64> {
if range.start() > range.end() {
return Vec::new();

View File

@@ -394,15 +394,27 @@ mod bench {
});
}
fn get_exp_data() -> Vec<u64> {
let mut data = vec![];
for i in 0..100 {
let num = i * i;
data.extend(iter::repeat(i as u64).take(num));
}
data.shuffle(&mut StdRng::from_seed([1u8; 32]));
// lengt = 328350
data
}
fn get_u128_column_permutation() -> Arc<dyn ColumnExt<u128>> {
let permutation = generate_permutation();
let permutation = permutation.iter().map(|el| *el as u128).collect::<Vec<_>>();
get_u128_column(&permutation)
}
fn get_data_50percent_item() -> (u128, u128, Vec<u128>) {
let mut permutation = generate_permutation();
let major_item = permutation[0];
let minor_item = permutation[1];
let mut permutation = get_exp_data();
let major_item = 20;
let minor_item = 10;
permutation.extend(iter::repeat(major_item).take(permutation.len()));
permutation.shuffle(&mut StdRng::from_seed([1u8; 32]));
let permutation = permutation.iter().map(|el| *el as u128).collect::<Vec<_>>();