#include "pocketpy/namedict.h" namespace pkpy{ uint16_t _find_perfect_hash_seed(uint16_t capacity, const std::vector& keys){ if(keys.empty()) return kHashSeeds[0]; static std::set indices; indices.clear(); std::pair best_score = {kHashSeeds[0], 0.0f}; const int kHashSeedsSize = sizeof(kHashSeeds) / sizeof(kHashSeeds[0]); for(int i=0; i best_score.second) best_score = {kHashSeeds[i], score}; } return best_score.first; } } // namespace pkpy