|
#1
|
|||
|
|||
Re: 7 Card Hand Evaluators
[ QUOTE ]
I'm assuming the only benefit to using the perfect hash version faster lookup creation? (I just used Cactus Kev's source). [/ QUOTE ] No, the perfect hash version's advantage comes from faster actual lookups... The last step in Cactus Kev's approach, after using the product of primes to establish a unique code which represnts any version of a 7-card holding, is to look up that product in a table. In Cactus Kev's code, the lookup is done via binary search. In Senzee's version, doing a hash and lookup is considerable faster on average - resulting in evals about 2.7 times faster in Senzee's tests. |
|
|