<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On 3 Oct 2023, at 10:02 pm, David Banas <capn.freako@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi all,<div><br></div><div>If this code:</div><div><br></div><div><div><font face="Menlo" style="font-size: 12px;"> f5Rslts = map (f5 (n-1) startingMinScore startingMaxScore (otherColor clr) 0) newBoards `using` parList rdeepseq</font></div><div><font face="Menlo" style="font-size: 12px;"> totalMoves = sum $ map snd f5Rslts -- Attempt at parallelization yielded no perf. improvement.</font></div></div><div><br></div><div>is yielding a fizzled spark ratio of about 0.3,</div><div>does it imply that the sum begins pulling from the list, before the sparks have had a chance to compute the first third of the list elements?</div></div></div></div></blockquote><br></div><div>A fizzed spark is when the user code indicated that some thunk could be run in parallel, but it didn’t end up being run in parallel because by the time it was inspected it was already evaluated. Fizzed sparks are described in “Runtime Support for Multicore Haskell”, Marlow, Peyton Jones, Singh, ICFP 2009.</div><div><br></div><div>It’s hard to tell what is happening without the code for ‘f5’, though probably 30% of results produced by ‘f5’ are already values (not thunks) so they cannot be evaluated in parallel by the ‘parList’ strategy.</div><div><br></div><div>Ben.</div></body></html>