Performance/Concurrency

From HaskellWiki
< Performance
Revision as of 19:18, 30 November 2007 by Jedbrown (talk | contribs) (Created page with tip from Simon M.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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.