pitrou commented on PR #45001:
URL: https://github.com/apache/arrow/pull/45001#issuecomment-2541783338

   Well, you could just add a constant, e.g.:
   ```c++
   template <bool T_COMBINE_HASHES, typename T>
   void Hashing32::HashIntImp(uint32_t num_keys, const T* keys, uint32_t* 
hashes) {
     constexpr uint64_t kMultiplier = 11400714785074694791ULL;
     constexpr uint64_t kAddend = 9756277977048271785ULL;
     for (uint32_t ikey = 0; ikey < num_keys; ++ikey) {
       uint64_t x = static_cast<uint64_t>(keys[ikey]) + kAddend;
       uint32_t hash = static_cast<uint32_t>(BYTESWAP(x * kMultiplier));
   
       if (T_COMBINE_HASHES) {
         hashes[ikey] = CombineHashesImp(hashes[ikey], hash);
       } else {
         hashes[ikey] = hash;
       }
     }
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to