View Single Post
  #35  
Old 12-26-2006, 12:51 AM
_D&L_ _D&L_ is offline
Senior Member
 
Join Date: May 2006
Posts: 128
Default Re: 7 Card Hand Evaluators

I've done the tests. It took some rewriting of my code to make your tests work, and i haven't yet checked them for accuracy.

Without the checksums i was getting 117,354,877 games per second. It took 1.14 seconds to process all 133,784,560 games in the loops.

With the check sums, which i didn't spend time optimizing it took 1.71 seconds, for a speed of 78,236,584 games per second.

The result of the check sums are as follows:
In order from lowest hand to highest (hi-card, 1 pair, 2 pair, 3 kind, straight, flush, full house, four kind, to straight flush).

23294460
58627800
31433400
6461620
6180020
4047644
3473184
224848
41584

Let me know if you see errors in the checksum. I actually had to look at code that is no longer in my program to interpret my lookup tables, cause all my program knows now is that higher integer > better cards. I wrote a compression algorithm to make all the rankings fit on one integer, and had to decompress the results for your test, so its possible i could have made a mistake. Its also why the checksums almost double the time it takes for my program to resolve values.

P.s. i know 117 million is faster than the 60 million i said earlier. My program is designed to do a lot more than just resolve hand values. I took out some of the overhead, for this test.
Reply With Quote