mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
Use 32-bit bit functions in patricia trie
This commit is contained in:
parent
7d9c363d65
commit
8fc3eb3e83
@ -435,15 +435,15 @@ static inline unsigned int bpt_branching_chunk(bpt_t bpt) {
|
||||
}
|
||||
|
||||
static inline unsigned int bpt_popcount(bpt_key_bitmask_t x) {
|
||||
return __builtin_popcountll(x);
|
||||
return __builtin_popcount(x);
|
||||
}
|
||||
|
||||
static inline unsigned int bpt_number_of_leading_zeros(bpt_key_t x) {
|
||||
return __builtin_clzll(x);
|
||||
return __builtin_clz(x);
|
||||
}
|
||||
|
||||
static inline unsigned int bpt_number_of_trailing_zeros(bpt_key_t x) {
|
||||
return __builtin_ctzll(x);
|
||||
return __builtin_ctz(x);
|
||||
}
|
||||
|
||||
static unsigned int bpt_find_diverging_chunk(bpt_key_t a, bpt_key_t b) {
|
||||
|
Loading…
Reference in New Issue
Block a user