You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2023/10/17 21:19:44 UTC
[datasketches-cpp] branch intesection_speed_fix created (now ea076f4)
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a change to branch intesection_speed_fix
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
at ea076f4 fix issue #395
This branch includes the following new commits:
new ea076f4 fix issue #395
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
[datasketches-cpp] 01/01: fix issue #395
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch intesection_speed_fix
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
commit ea076f453d36c32d64768043b47db5d49f51ebc3
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Tue Oct 17 14:19:33 2023 -0700
fix issue #395
---
theta/include/theta_intersection_base_impl.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/theta/include/theta_intersection_base_impl.hpp b/theta/include/theta_intersection_base_impl.hpp
index ede9c29..1adb40e 100644
--- a/theta/include/theta_intersection_base_impl.hpp
+++ b/theta/include/theta_intersection_base_impl.hpp
@@ -49,7 +49,7 @@ void theta_intersection_base<EN, EK, P, S, CS, A>::update(SS&& sketch) {
if (!is_valid_) { // first update, copy or move incoming sketch
is_valid_ = true;
const uint8_t lg_size = lg_size_from_count(sketch.get_num_retained(), theta_update_sketch_base<EN, EK, A>::REBUILD_THRESHOLD);
- table_ = hash_table(lg_size, lg_size, resize_factor::X1, 1, table_.theta_, table_.seed_, table_.allocator_, table_.is_empty_);
+ table_ = hash_table(lg_size, lg_size - 1, resize_factor::X1, 1, table_.theta_, table_.seed_, table_.allocator_, table_.is_empty_);
for (auto&& entry: sketch) {
auto result = table_.find(EK()(entry));
if (result.second) {
@@ -88,8 +88,8 @@ void theta_intersection_base<EN, EK, P, S, CS, A>::update(SS&& sketch) {
if (table_.theta_ == theta_constants::MAX_THETA) table_.is_empty_ = true;
} else {
const uint8_t lg_size = lg_size_from_count(match_count, theta_update_sketch_base<EN, EK, A>::REBUILD_THRESHOLD);
- table_ = hash_table(lg_size, lg_size, resize_factor::X1, 1, table_.theta_, table_.seed_, table_.allocator_, table_.is_empty_);
- for (uint32_t i = 0; i < match_count; i++) {
+ table_ = hash_table(lg_size, lg_size - 1, resize_factor::X1, 1, table_.theta_, table_.seed_, table_.allocator_, table_.is_empty_);
+ for (uint32_t i = 0; i < match_count; ++i) {
auto result = table_.find(EK()(matched_entries[i]));
table_.insert(result.first, std::move(matched_entries[i]));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org