I have ported the program to x64. I have added multi-threading. I can keep eight cores going at 50% without increasing priority. Why do I do this? The holy grail is to prove that good deals are hard to lose. My preliminary runs support that hypothesis. You'll be hard pressed to lose a good deal regardless of the number of mistakes you make. I'll quantify this in upcoming posts.
From a computer geek point of view, reader/writer locks are your friends. I can't utilize processor unless I do a reader/writer lock on the list of unique card stacks. What's a reader/writer lock? I had a guy at work who went ballistic over this concept but it's pretty simple. If you are comparing card stacks, you can have as many threads as you want comparing card stacks. When you go to add a stack to the list, it is imperative that everyone be locked out of accessing the list of cards stacks. Thus a reader/writer lock lets all readers in, keeps writers out. When all pending readers are finished, the writer comes in and takes exclusive control of the list of card stacks. It works! She is your friend!
No comments:
Post a Comment