Hi,
Where can I find information about the performance of the
nextProbablePrime() method in the java.math.BigInteger class? The
relates to the initial capacity of a HashMap.
The HashMap that can hold data of at least size X and at most Y,
and I want to set the initial capacity to the next possible prime
between X and Y.
By the way Y = X * 2.
At the moment I am setting the capacity to X but I've read that
HashMaps perform better if the initial capacity is a prime number - I
want to
test this.
Will setting the initial capacity to the value returned by nextProbablyPrime() - starting from position X - have a significant improvement or is it going to waste memory?
Thanks,
Chris