Commit graph

4 commits

Author SHA1 Message Date
Marko Mäkelä
df3855a471 MDEV-35247: ut_hash_ulint() is a waste
ut_hash_ulint(): Remove. The exclusive OR before a modulus operation
does not serve any useful purpose; it is only obfuscating code and
wasting some CPU cycles.

Reviewed by: Debarun Banerjee
2024-11-21 08:59:31 +02:00
Marko Mäkelä
a9b0a1c5d0 MDEV-35247: ut_fold_ull() is a waste
ut_fold_ull(): For SIZEOF_SIZE_T < 8, we simulate universal hashing
(Carter and Wegman, 1977) by pretending that SIZE_T_MAX + 1
is a prime. In other words, we implement a Rabin–Karp rolling
hash algorithm similar to java.lang.String.hashCode().
This is used for representing 64-bit dict_index_t::id or
dict_table_t::id in the native word size.

For SIZEOF_SIZE_T >= 8, we just use an identity mapping.

Reviewed by: Debarun Banerjee
2024-11-21 08:59:17 +02:00
Oleksandr Byelkin
f5c5f8e41e Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
Vladislav Vaintroub
47e18af906 MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
Renamed from storage/innobase/include/ut0rnd.ic (Browse further)