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

perf and bugfix #74

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/utils/bucketers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ struct table_bucketer {
const double alpha) {
base.init(num_buckets, lambda, table_size, alpha);

fulcrums.push_back(0);
fulcrums[0] = 0;
for (size_t xi = 0; xi < FULCS - 1; xi++) {
double x = double(xi) / double(FULCS - 1);
double y = base.bucketRelative(x);
auto fulcV = uint64_t(y * double(num_buckets << 16));
fulcrums.push_back(fulcV);
fulcrums[xi + 1] = fulcV;
}
fulcrums.push_back(num_buckets << 16);
fulcrums[FULCS - 1] = num_buckets << 16;
}

inline uint64_t bucket(const uint64_t hash) const {
Expand Down Expand Up @@ -58,7 +58,7 @@ struct table_bucketer {

Bucketer base;
static const uint64_t FULCS = 2048;
std::vector<uint64_t> fulcrums;
std::array<uint64_t, FULCS> fulcrums;
};

struct opt_bucketer {
Expand Down
2 changes: 1 addition & 1 deletion include/utils/dense_encoders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct diff {
}

size_t num_bits() const {
return sizeof(m_increment) + m_encoder.num_bits();
return 8 * sizeof(m_increment) + m_encoder.num_bits();
}

inline uint64_t access(uint64_t i) const {
Expand Down
2 changes: 1 addition & 1 deletion src/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void build(cmd_line_parser::parser const& parser, Iterator keys, uint64_t num_ke
return;
}

config.secondary_sort = false; // parser.get<bool>("secondary_sort");
config.secondary_sort = true; // parser.get<bool>("secondary_sort");
config.minimal = parser.get<bool>("minimal");
config.verbose = parser.get<bool>("verbose");

Expand Down