You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the pr removed the kBitMask in arrow-rs[1]. Besides, abseil mentions that this optimization is useless in Haswell machine [2][3], and this might also suffer from cache eviction. Should we trying to remove them and use something like above:
// Bitmask selecting the k-th bit in a byte// static constexpr uint8_t kBitmask[] = {1, 2, 4, 8, 16, 32, 64, 128};staticconstexpruint8_tGetBitMask(uint8_t index) {
// DCHECK(index >= 0 && index <= 7);returnstatic_cast<uint8_t>(1) << index;
}
// the bitwise complement version of kBitmask// static constexpr uint8_t kFlippedBitmask[] = {254, 253, 251, 247, 239, 223, 191, 127};staticconstexpruint8_tGetFlippedBitMask(uint8_t index) {
// DCHECK(index >= 0 && index <= 7);return ~(static_cast<uint8_t>(1) << index);
}
felipecrv
changed the title
[C++] bit_util: Remove the pre-computed kBitMask table ?
[C++] bit_util: Remove the pre-computed kBitmask table ?
May 16, 2024
Describe the enhancement requested
I see the pr removed the
kBitMask
in arrow-rs[1]. Besides, abseil mentions that this optimization is useless in Haswell machine [2][3], and this might also suffer from cache eviction. Should we trying to remove them and use something like above:[1] apache/arrow-rs#5771
[2] https://abseil.io/fast/9
[3] https://abseil.io/fast/39
Component(s)
C++
The text was updated successfully, but these errors were encountered: