Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 01-05-2007, 03:07 AM
RayW RayW is offline
Junior Member
 
Join Date: Mar 2005
Posts: 24
Default Re: 7 Card Hand Evaluators

Hi Steve!!

[ QUOTE ]
h |= ((Hand_T)1 << deck[r]);


[/ QUOTE ]

Interesting you had this outside the eval routine... The equivelent statement for me is:
<font class="small">Code:</font><hr /><pre> h = HR[h + deck[r]]; </pre><hr />

Please initialize h to 53 before the beginning of the hand loop. The lookup loop for me will be:
<font class="small">Code:</font><hr /><pre> handTypeSum[hands[i] &gt;&gt; 12]++; </pre><hr />

I think you will find that this might be a little quicker... [img]/images/graemlins/wink.gif[/img]

Of course if this isn't a good alternative, put the hand init (quoted code above) into the same for loop in the eval section, I think you will find similar results. I think the for loop inside the eval area is definitely a killer in this...

Either way, even if there really was a speed difference (and I don't think it is as big as it looks), how often would you do a million random hands? If you had to do them, would the half a sec make a big difference? How does your evaluator do for the big enumerations (that at least I seem to always be running)?

What evaluator did you use to do the comparison?

Thank you for the info, definitely had something interesting there...

Ray...
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.