-
Notifications
You must be signed in to change notification settings - Fork 98
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
base: master
Are you sure you want to change the base?
Conversation
b7ad2cb
to
6e9dae7
Compare
2e61c71
to
31927b7
Compare
31927b7
to
104ffe0
Compare
common/algorithms/hashes.h
Outdated
explicit range_hasher(Hasher hasher = Hasher()) : | ||
Hasher(std::move(hasher)) { | ||
} | ||
explicit range_hasher(Hasher hasher = Hasher()) | ||
: Hasher(std::move(hasher)) {} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
common/common.cmake
Outdated
@@ -9,6 +9,7 @@ prepend(COMMON_MAIN_SOURCES ${COMMON_DIR}/ | |||
|
|||
sha1.cpp | |||
allocators/freelist.cpp | |||
algorithms/murmur-hash.cpp |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
runtime/datetime/datetime.h
Outdated
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())); |
There was a problem hiding this comment.
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?
7aad41e
to
609c311
Compare
1b9661f
to
75caf22
Compare
983e1d0
to
d4e1f27
Compare
This reverts commit 94286be.
d4e1f27
to
7b9b393
Compare
compiler/compiler.cmake
Outdated
@@ -15,6 +15,7 @@ endif() | |||
|
|||
prepend(KPHP_COMPILER_COMMON ${COMMON_DIR}/ | |||
dl-utils-lite.cpp | |||
algorithms/murmur-hash.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
No description provided.