I just saw that function in code, and intuitively it should return the next prime number greater than the argument. When I call it that way, however, I get 53! and then when I pass in 54 i get 97. I’m not finding a description of what it does online, can anybody point me to one or does anybody know what this does?
Share
It returns the next prime that is sufficiently greater than the specified prime to be worth reorganizing a hash table to that number of buckets. If it returned the very next prime, you’d be reorganizing your hash tables way too often. It is an implementation detail of the hash table code and it’s not meant to be used by outside code.