MCPcopy Create free account
hub / github.com/catboost/catboost / NaiveHash

Function NaiveHash

library/cpp/case_insensitive_string/benchmark/hash.cpp:14–21  ·  view source on GitHub ↗

THash ::operator() is not inlined

Source from the content-addressed store, hash-verified

12namespace {
13 // THash<TCaseInsensitiveStringBuf>::operator() is not inlined
14 Y_NO_INLINE size_t NaiveHash(TCaseInsensitiveStringBuf str) noexcept {
15 TMurmurHash2A<size_t> hash;
16 for (size_t i = 0; i < str.size(); ++i) {
17 char lower = std::tolower(str[i]);
18 hash.Update(&lower, 1);
19 }
20 return hash.Value();
21 }
22
23 [[maybe_unused]] Y_NO_INLINE size_t OptimizedHashV1(TCaseInsensitiveStringBuf str) noexcept {
24 TMurmurHash2A<size_t> hash;

Callers 1

CaseInsensitiveHashFunction · 0.85

Calls 3

sizeMethod · 0.45
UpdateMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected