Just another definition of calculateSeq:
calculateSeq = zipWith ($) (cycle [sin,cos]) . map sqrt
This is just slightly slower than my implementation.
I came up with a better implementation of parallel function:
calculatePar2 :: [Double] - [Double]
calculatePar2 xss = runEval $
concat
Dear Janek,
I am reading Simon Marlow's tutorial on parallelism and I have problems
with correctly using Eval monad and Strategies. I *thought* I understand
them but after writing some code it turns out that obviously I don't
because parallelized code is about 20 times slower. Here's a short
Just another definition of calculateSeq:
calculateSeq = zipWith ($) (cycle [sin,cos]) . map sqrt
2012/11/15 Janek S. fremenz...@poczta.onet.pl
Do you really mean to calculate the 'sin . sqrt' of just the head of the
list, or do you mean:
calculateSeq = map (sin . sqrt) ?
Argh.. of
Do you really mean to calculate the 'sin . sqrt' of just the head of the
list, or do you mean:
calculateSeq = map (sin . sqrt) ?
Argh.. of course not! That's what you get when you code in the middle of a
night. But in my code I
will not be able to use map because elements will be processed
Dear Haskellers,
I am reading Simon Marlow's tutorial on parallelism and I have problems with
correctly using Eval
monad and Strategies. I *thought* I understand them but after writing some code
it turns out that
obviously I don't because parallelized code is about 20 times slower. Here's a
On Nov 14, 2012 10:44 PM, Janek S. fremenz...@poczta.onet.pl wrote:
calculateSeq :: [Double] - [Double]
calculateSeq [] = []
calculateSeq (x:xs) = (sin . sqrt $ x) : xs
Do you really mean to calculate the 'sin . sqrt' of just the head of the
list, or do you mean:
calculateSeq = map (sin .