diff --git a/benchmarks/README.md b/benchmarks/README.md index e9de7ff..5d1afcd 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -30,7 +30,7 @@ The query times are relative to the following configuration: ### Space in bits/kmer -| Dictionary |elegans ||| cod ||| kesterl ||| human ||| +| Dictionary |elegans ||| cod ||| kestrel ||| human ||| |:------------------|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:-----:|:-------:|:-----:| | | k=31 | k=47 | k=63 | k=31 | k=47 | k=63 | k=31 | k=47 | k=63 | k=31 | k=47 | k=63 | | SSHash, **regular** | 5.86 | 4.29 | 3.51 | 7.84 | 5.17 | 4.26 | 7.53 | 4.67 | 3.76 | 8.70 | 5.65 | 4.64 | diff --git a/external/pthash b/external/pthash index 28aedcb..2ee455f 160000 --- a/external/pthash +++ b/external/pthash @@ -1 +1 @@ -Subproject commit 28aedcb03af096c0e9988b1ad240da7b4cf010d7 +Subproject commit 2ee455f7ce1cb3f1f99242b4ffdbe28ed72a7f7f diff --git a/include/info.cpp b/include/info.cpp index 71de6d4..c1fcee1 100644 --- a/include/info.cpp +++ b/include/info.cpp @@ -24,8 +24,9 @@ uint64_t skew_index::print_info() const { } void dictionary::print_space_breakdown() const { - std::cout << "total index size: " << essentials::convert((num_bits() + 7) / 8, essentials::MB) - << " [MB]" << '\n'; + const uint64_t num_bytes = (num_bits() + 7) / 8; + std::cout << "total index size: " << num_bytes << " [B] -- " + << essentials::convert(num_bytes, essentials::MB) << " [MB]" << '\n'; std::cout << "SPACE BREAKDOWN:\n"; std::cout << " minimizers: " << static_cast(m_minimizers.num_bits()) / size() << " [bits/kmer]\n"; diff --git a/include/skew_index.hpp b/include/skew_index.hpp index ca9b2ef..c1ff603 100644 --- a/include/skew_index.hpp +++ b/include/skew_index.hpp @@ -33,7 +33,9 @@ struct skew_index { uint64_t num_bits() const { uint64_t n = - (sizeof(min_log2) + sizeof(max_log2) + sizeof(log2_max_num_super_kmers_in_bucket)) * 8; + (sizeof(min_log2) + sizeof(max_log2) + sizeof(log2_max_num_super_kmers_in_bucket) + + 2 * sizeof(size_t) /* for std::vector::size */) * + 8; for (uint64_t partition_id = 0; partition_id != mphfs.size(); ++partition_id) { auto const& mphf = mphfs[partition_id]; auto const& P = positions[partition_id]; diff --git a/src/common.hpp b/src/common.hpp index 301b330..b8d7ba3 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -12,11 +12,11 @@ void random_kmer(char* kmer, uint64_t k) { } void load_dictionary(dictionary& dict, std::string const& index_filename, bool verbose) { - uint64_t num_bytes_read = essentials::load(dict, index_filename.c_str()); + const uint64_t num_bytes_read = essentials::load(dict, index_filename.c_str()); if (verbose) { - std::cout << "index size: " << essentials::convert(num_bytes_read, essentials::MB) - << " [MB] (" << (num_bytes_read * 8.0) / dict.size() << " [bits/kmer])" - << std::endl; + std::cout << "total index size: " << num_bytes_read << " [B] -- " + << essentials::convert(num_bytes_read, essentials::MB) << " [MB] (" + << (num_bytes_read * 8.0) / dict.size() << " [bits/kmer])" << std::endl; dict.print_info(); } }