Parallelhashlist was updated to version 1.41 ...

Parallelhashlist was updated to version 1.41 ...

I have modified parallelhashlist to use 128 locks, but you have to use a hashsize inpower of 2 and greater to 1000,how do you pass a hashsize in power of 2 to the constructor? by using shl operation like this

"Any data structures 101 book will say choose a prime for thenumber of buckets, so that the bucket's index can easily be computed by h(k) = k mod m, where k is the key value and m is the bucket size. While this approach is straight-forward, there are a number of issues with it, including slow modulo performance. ConcurrentHashMap instead uses a power-of-two rule"

I am usingmodulo functions inside parallelhashlist, and using a number of locks in power of 2, so you have to usehashsize in power of 2 , this will make the modulo function ofthe delphi and freepascal compilers10X faster.

>I am usingmodulo functions inside parallelhashlist, and using a number of locks >in power of 2, so you have to usehashsize in power of 2 , this will make the >modulo function ofthe delphi and freepascal compilers10X faster.

I mean that the modulo function that i am using a lot inside parallelhashlistis 10X faster when the hashsize is power of 2 than when it's not power of 2.

But the scalability of parallelhashlist does depend onthe data keys that are presentedto parallelhashlist,when the data keys are hashed and are very well distributedacrossthe segments, in fact you can get a perfect 4X scaling both on reads and writes.

I write:>But the scalability of parallelhashlist does depend on the data keys >that are presented to parallelhashlist, when the data keys are hashed >and are very well distributed across the segments, in fact you can >get a perfect 4X scaling both on reads and writes.