Optimising Haskell, example 4
Another example where changing the representation gives a huge speedup. Plus some actual Haskell optimisation as a bonus!
Another example where changing the representation gives a huge speedup. Plus some actual Haskell optimisation as a bonus!