Advice wanted on parallel processing

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Mar 18 19:19:09 EDT 2009


On 2009 Mar 18, at 16:59, Colin Paul Adams wrote:
>>>>>> "Brandon" == Brandon S Allbery KF8NH <allbery at 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] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20090318/4072456f/PGP.bin


More information about the Glasgow-haskell-users mailing list