diff --git a/include/sketch.h b/include/sketch.h index 1bcfdb53..3dd138b4 100644 --- a/include/sketch.h +++ b/include/sketch.h @@ -92,7 +92,8 @@ class Sketch { static vec_t calc_vector_length(node_id_t num_vertices) { // return ceil(double(num_vertices) * (num_vertices - 1) / 2); // return num_vertices * 4; - return 50; // round to something thats approx 2^6 + // return 50; // round to something thats approx 2^6 + return 15; // return 1 + num_vertices / 16 ; } diff --git a/src/sketch.cpp b/src/sketch.cpp index 49fde2e2..0e618032 100644 --- a/src/sketch.cpp +++ b/src/sketch.cpp @@ -262,7 +262,7 @@ void Sketch::update(const vec_t update_idx) { // TODO - magical number // std::cout << "Buffer full, reallocating" << std::endl; // reallocate((bkt_per_col * 8) / 5); - reallocate(bkt_per_col + 3); + reallocate(bkt_per_col + 1); // std::cout << "and now injecting" << std::endl; inject_buffer_buckets(); // bucket_buffer.insert(i, depth, {update_idx, checksum}); @@ -394,7 +394,7 @@ void Sketch::merge(const Sketch &other) { while (!sufficient_space) { // std::cout << "Merge: Buffer full, reallocating" << std::endl; // reallocate((bkt_per_col * 8) / 5); - reallocate(bkt_per_col + 3); + reallocate(bkt_per_col + 1); inject_buffer_buckets(); sufficient_space = !bucket_buffer.over_capacity(); } @@ -487,7 +487,7 @@ void Sketch::range_merge(const Sketch &other, size_t start_sample, size_t n_samp while (!sufficient_space) { // std::cout << "Merge: Buffer full, reallocating" << std::endl; // reallocate((bkt_per_col * 8) / 5); - reallocate(bkt_per_col + 3); + reallocate(bkt_per_col + 1); inject_buffer_buckets(); sufficient_space = !bucket_buffer.over_capacity(); }