[Haskell-cafe] Optimizations and parallel execution in the IO for a small spellchecker

Paul Sujkov psujkov at gmail.com
Wed Feb 15 18:33:26 CET 2012

Hi everyone,


that's a very simple spellchecker application: it consumes standard Linux
dictionary, reads a file, and prints out words from that file that are not
on the dictionary. I have taken it from a little cross-language benchmark
and used to benchmark existing hash table implementations available on
Hackage (with one used in code being the best according to timings). The
question is: can I go further and effectively execute lookup and (maybe)
output (line 20 or line 26 in the snippet) in parallel?

I'm not good at all with Haskell parallel packages; I've tried
monad-parallel (naive implementation eats away all the memory available)
and parallel (haven't tried Par monad yet), but the last dosn't seem to fit
well with the IO operations. If anyone can give me any suggestions on how
can I implement parallel execution, or any thoughts on further sequential
optimizations, it would be deeply appreciated.

Regards, Paul Sujkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120215/c0be9337/attachment.htm>

More information about the Haskell-Cafe mailing list