Skip to content
0:00 / 0:00

#parallelism#linearregression#par

Pure parallelism (Haskell Unfolder #47)

Well-Typed

3.4K subscribers • 13 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.

Intermediate. Assumes working knowledge.

1.9K views1 year ago1 recommendation

Programming languagesSystems programmingHaskellConcurrency and parallelismPerformance and optimization

How to implement pure parallelism in Haskell using the par and pseq primitives to speed up linear regression.

"Pure parallelism" refers to the execution of pure Haskell functions on multiple CPU cores, (hopefully) speeding up the computation. Since we are still dealing with pure functions, however, we get none of the problems normally associated with concurrent execution: no non-determinism, no need for locks, etc. In this episode we will develop a pure but parallel implementation of linear regression. We will briefly recap how linear regression works, before discussing the two primitive functions that Haskell offers for pure parallelism: `par` and `pseq`. References: * "Seq no more: Better Strategies for Parallel Haskell", Simon Marlow et al., Haskell Symposium 2010. simonmar.github.io/bib/papers/strategies.pdf * "Proof: Ordinary least squares for simple linear regression", Joram Soch et al. statproofbook.github.io/P/slr-ols.html * "What Textbooks Don't Tell You About Curve Fitting", Artem Kirsanov. youtube.com/watch?v=q7seckj1hwM

Why it's here

1 person recommends this

u/kosmikusin r/haskell • Recommends

Pure parallelism (Haskell Unfolder #47) Will be streamed today, 2025-07-23, at 1830 UTC. Abstract: *"Pure parallelism" refers to the execution of pure Haskell functions on multiple CPU cores, (hopefully) speeding up the computation. Since we are still dealing with pure functions, however, we get none of the problems normally associated with concurrent execution: no non-determinism, no need for locks, etc. In this episode we will develop a pure but parallel implementation of linear regression. We will briefly recap how linear regression works, before discussing the two primitive functions that Haskell offers for pure parallelism:* `par` *and* `pseq`*.*