Re: parList implementation question

2009-12-21 Thread Marcus D. Gabriel
Thanks Simon. Parallel 2.2.0.1 was straight forward. I just replaced rnf with rdeepseq and my original use of parMap worked like a charm giving twice the performance for my dual-core system as I original expected and now find. Thanks, - Marcus Marcus D. Gabriel wrote: > Thank you Simon, I w

Re: parList implementation question

2009-12-21 Thread Marcus D. Gabriel
, from my perspective, 6.12.1 is certainly an improvement here. Cheers, - Marcus Simon Marlow wrote: > > On 18/12/2009 18:31, Marcus D. Gabriel wrote: >> Hello, >> >> In Control.Parallel.Strategies, parList is defined as >> >> parList strat [] = () &g

Re: How does forkIO and par interact?

2009-12-20 Thread Marcus D. Gabriel
the spark. when calculation > is completed, its thunk will be updated with result of calculation (as > usual in lazy calculations). so killing originator thread doesn't > affect all the sparks it has created, it only prevents generation of > new sparks. -- Marcus D. Gabriel, Ph.D.

Re: parList implementation question

2009-12-20 Thread Marcus D. Gabriel
rst to change my code. No point in responding until I determine what this means. Thanks nevertheless, - Marcus Marcus D. Gabriel wrote: > Denis Bueno wrote: >> On Fri, Dec 18, 2009 at 11:31, Marcus D. Gabriel wrote: >>> than parList via parMap. For example, in one experiment, parMap

How does forkIO and par interact?

2009-12-20 Thread Marcus D. Gabriel
Hello, How does forkIO (forkOS) and par interact with one another? Here is why I ask. I have a GUI application that has something like this: th <- forkIO (guiCode + longRunningPureSerialCode) Later, a user interaction invokes killThread th and the guiCode plus the longRunningPureSeri

Re: parList implementation question

2009-12-19 Thread Marcus D. Gabriel
Denis Bueno wrote: > On Fri, Dec 18, 2009 at 11:31, Marcus D. Gabriel wrote: >> than parList via parMap. For example, in one experiment, parMap >> with parList run at 0.81 the time of the serial solution whereas >> forceParMap with forceParList run at 0.58 the time of t

parList implementation question

2009-12-18 Thread Marcus D. Gabriel
Hello, In Control.Parallel.Strategies, parList is defined as parList strat [] = () parList strat (x:xs) = strat x `par` (parList strat xs) with parMap strat f xs = map f xs `using` parList strat. I have recently found that if I define forceParMap strat f xs = map f xs `usi

Re: GHC Data.List.sort performance question

2008-01-16 Thread Marcus D. Gabriel
heers, - Marcus Ian Lynagh wrote: Hi Marcus, On Mon, Jan 14, 2008 at 10:01:49PM +0100, Marcus D. Gabriel wrote: code in libraries/base/Data/List.hs for merge is merge cmp xs [] = xs merge cmp [] ys = ys merge cmp [] ys = ys merge cmp xs [] = xs This actually came up a while ago, in this t

Re: GHC Data.List.sort performance question

2008-01-15 Thread Marcus D. Gabriel
rt 100 +RTS -K50M Length of sorted random list = 100 real 0m38.16s user 0m37.34s sys 0m0.61s % time ./sorting --random sortX 100 Length of sorted random list = 100 real 0m19.36s user 0m18.94s sys 0m0.37s Cheers, - Marcus Bertram Felgenhauer wrote: Marcus D. Gabriel wrote: B

GHC Data.List.sort performance question

2008-01-14 Thread Marcus D. Gabriel
y one obtains this performance improvement? I currently just do not grasp the point. Thanks, - Marcus -- Marcus D. Gabriel, Ph.D.Email:[EMAIL PROTECTED] 213 ter, rue de Mulhouse Tel: +33.3.89.69.05.06 F68300 Saint Louis FRANCE