Personal tools

Performance/Concurrency

From HaskellWiki

< Performance
Revision as of 19:18, 30 November 2007 by Jedbrown (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is just a start.

When using -threaded, never use the main thread to do the real work. Communication between the main thread and other forkIO'd threads is much much slower than between two forkIO'd threads, because the main thread is a "bound thread" (i.e. it has an OS thread to itself). This is perhaps the main reason that turning on -threaded will make the version of threadring above go much slower.