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

use murmur hash for class name hashing #1240

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

apolyakov
Copy link
Contributor

No description provided.

@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch from b7ad2cb to 6e9dae7 Compare February 20, 2025 13:18
@apolyakov apolyakov changed the title Apolyakov/use murmurhash for class hashes use murmur hash for class name hashing Feb 21, 2025
@apolyakov apolyakov marked this pull request as ready for review February 21, 2025 09:49
@apolyakov apolyakov self-assigned this Feb 21, 2025
@apolyakov apolyakov added runtime Feature related to runtime k2 k2 related labels Feb 21, 2025
@apolyakov apolyakov added this to the next milestone Feb 21, 2025
@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch 2 times, most recently from 2e61c71 to 31927b7 Compare February 21, 2025 12:21
@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch from 31927b7 to 104ffe0 Compare February 25, 2025 10:35
Comment on lines 50 to 54
explicit range_hasher(Hasher hasher = Hasher()) :
Hasher(std::move(hasher)) {
}
explicit range_hasher(Hasher hasher = Hasher())
: Hasher(std::move(hasher)) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra diff here and in other places in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -9,6 +9,7 @@ prepend(COMMON_MAIN_SOURCES ${COMMON_DIR}/

sha1.cpp
allocators/freelist.cpp
algorithms/murmur-hash.cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more space, in compiler.cmake too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks nicely indented in both github editor and my IDE

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tab, we use spaces instead

Comment on lines 27 to 28
int get_hash() const noexcept final {
return 2141635158;
std::string_view name_view{get_class()};
return static_cast<int32_t>(vk::murmur_hash<uint32_t>(name_view.data(), name_view.size()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't murmurhash be defined as constexpr?

@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch from 7aad41e to 609c311 Compare February 25, 2025 16:13
@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch from 1b9661f to 75caf22 Compare February 26, 2025 12:51
@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch from 983e1d0 to d4e1f27 Compare February 27, 2025 09:17
@apolyakov apolyakov force-pushed the apolyakov/use-murmurhash-for-class-hashes branch from d4e1f27 to 7b9b393 Compare February 27, 2025 12:47
@@ -15,6 +15,7 @@ endif()

prepend(KPHP_COMPILER_COMMON ${COMMON_DIR}/
dl-utils-lite.cpp
algorithms/murmur-hash.cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor

@mkornaukhov03 mkornaukhov03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k2 k2 related runtime Feature related to runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants