[Haskell-cafe] Karatsuba Multiplication Parallel

Ertugrul Soeylemez es at ertes.de
Fri Sep 16 13:31:26 CEST 2011

Burak Ekici <ekcburak at hotmail.com> wrote:

> I am trying to parallelize the below Karatsuba multiplication
> code. However, at each trial of mine the error message speaking of
> "incorrect indentation" is returned. I could not come up with ideas to
> solve the problem.

I didn't read enough of the code to help you with your actual issue, but
I'd like to point out that you have to use sharing for the parallel
processing to be effective.  In other words, this is wrong:

    3^10000 `par` 5^10000 `pseq` 3^10000 * 5^10000

and this is right:

    let x = 3^10000
        y = 5^10000
    in x `par` y `pseq` x * y


nightmare = unsafePerformIO (getWrongWife >>= sex)

More information about the Haskell-Cafe mailing list