Performance/Concurrency

From HaskellWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.