diff options
author | risenberg <risenberg@yandex-team.ru> | 2022-02-10 16:49:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:47 +0300 |
commit | ec551e975caf33bd88e2803b55464cad608e2441 (patch) | |
tree | d2f84f5b97ecb84201832f831b261817be37fbfe /library/cpp/containers | |
parent | 6a705ee267e43301156c202a4b371d47ddd4dd4f (diff) | |
download | ydb-ec551e975caf33bd88e2803b55464cad608e2441.tar.gz |
Restoring authorship annotation for <risenberg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers')
-rw-r--r-- | library/cpp/containers/comptrie/chunked_helpers_trie.h | 2 | ||||
-rw-r--r-- | library/cpp/containers/comptrie/comptrie_builder.h | 4 | ||||
-rw-r--r-- | library/cpp/containers/comptrie/comptrie_builder.inl | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/containers/comptrie/chunked_helpers_trie.h b/library/cpp/containers/comptrie/chunked_helpers_trie.h index cfa35f5ba2..cb6d7dd8f3 100644 --- a/library/cpp/containers/comptrie/chunked_helpers_trie.h +++ b/library/cpp/containers/comptrie/chunked_helpers_trie.h @@ -166,7 +166,7 @@ public: void Save(IOutputStream& out, bool minimize = false) const { if (minimize) { - CompactTrieMinimize<TBuilder>(out, Builder, false); + CompactTrieMinimize<TBuilder>(out, Builder, false); } else { Builder.Save(out); } diff --git a/library/cpp/containers/comptrie/comptrie_builder.h b/library/cpp/containers/comptrie/comptrie_builder.h index cf7d2e39a3..5754b3e70b 100644 --- a/library/cpp/containers/comptrie/comptrie_builder.h +++ b/library/cpp/containers/comptrie/comptrie_builder.h @@ -120,9 +120,9 @@ protected: template <class TPacker> size_t CompactTrieMinimize(IOutputStream& os, const char* data, size_t datalength, bool verbose = false, const TPacker& packer = TPacker(), NCompactTrie::EMinimizeMode mode = NCompactTrie::MM_DEFAULT); -template <class TTrieBuilder> +template <class TTrieBuilder> size_t CompactTrieMinimize(IOutputStream& os, const TTrieBuilder& builder, bool verbose = false); - + //---------------------------------------------------------------------------------------------------------------- // Lay the trie in memory in such a way that there are less cache misses when jumping from root to leaf. // The trie becomes about 2% larger, but the access became about 25% faster in our experiments. diff --git a/library/cpp/containers/comptrie/comptrie_builder.inl b/library/cpp/containers/comptrie/comptrie_builder.inl index f273fa6571..3f0ba675a4 100644 --- a/library/cpp/containers/comptrie/comptrie_builder.inl +++ b/library/cpp/containers/comptrie/comptrie_builder.inl @@ -1065,13 +1065,13 @@ size_t CompactTrieMinimize(IOutputStream& os, const char* data, size_t datalengt using namespace NCompactTrie; return CompactTrieMinimizeImpl(os, data, datalength, verbose, &packer, mode); } - -template <class TTrieBuilder> + +template <class TTrieBuilder> size_t CompactTrieMinimize(IOutputStream& os, const TTrieBuilder& builder, bool verbose /*=false*/) { - TBufferStream buftmp; - size_t len = builder.Save(buftmp); - return CompactTrieMinimize<typename TTrieBuilder::TPacker>(os, buftmp.Buffer().Data(), len, verbose); -} + TBufferStream buftmp; + size_t len = builder.Save(buftmp); + return CompactTrieMinimize<typename TTrieBuilder::TPacker>(os, buftmp.Buffer().Data(), len, verbose); +} //---------------------------------------------------------------------------------------------------------------- // Lay the trie in memory in such a way that there are less cache misses when jumping from root to leaf. |