[Mono-list] More fighting with Hashtable
Andrei Zmievski
andrei@ispi.net
Fri, 13 Jul 2001 00:21:23 -0500
At 11:21 PM 7/12/01 -0600, John Barnette wrote:
>I've got it currently implemented as
>
> int newCapacity = oldCapacity * 2 + 1;
>
>...which works, but I'd rather be specworthy. Can anybody point me at some
>math for determining the next prime number greater than a given integer?
In PHP, we cheat a bit and just keep a limited array of prime numbers just
for that purpose.
http://lxr.php.net/source/Zend/zend_hash.c#120
-Andrei