On 2009 Mar 18, at 16:59, Colin Paul Adams wrote:
"Brandon" == Brandon S Allbery KF8NH <allb...@ece.cmu.edu> writes:

The array has 12 elements.

   Brandon> How many times do you call it?  Perhaps the real
   Brandon> optimization you need is to memoize.

Very many times indeed. But it is a different array on most occasions
(I am not updating in place).

It represents one rank of the board on which the game is played. The
move generator produces a new board for each move.


It might be helpful for you to show more of the program.

One thing to keep in mind about parallelization is that the level at which happens matters: if individual calculations across the list are fast, all you gain by parallelizing it is MP synchronization/locking overhead. On the other hand, it's possible that if the caller can be rearranged so that rank_value is computed on another CPU while it's doing something else, you could gain quite a bit. Or maybe the caller is itself at the right level to parallelize.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to