diff options
author | risenberg <risenberg@yandex-team.ru> | 2022-02-10 16:49:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:48 +0300 |
commit | 99ac40630808727955ac0448822228528f1ea92d (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/containers | |
parent | ec551e975caf33bd88e2803b55464cad608e2441 (diff) | |
download | ydb-99ac40630808727955ac0448822228528f1ea92d.tar.gz |
Restoring authorship annotation for <risenberg@yandex-team.ru>. Commit 2 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 cb6d7dd8f30..cfa35f5ba2a 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 5754b3e70b8..cf7d2e39a34 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 3f0ba675a4d..f273fa65710 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. |