/mobile Handheld Friendly website

 performance measurements

Each table row shows performance measurements for this Haskell GHC program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load

Read the ↓ make, command line, and program output logs to see how this program was run.

Read thread-ring benchmark to see what this program should do.


The Glorious Glasgow Haskell Compilation System, version 7.8.2

503 threads are created with forkIO, with each thread creating one synchronised mutable variable (MVar) shared with the next thread in the ring. The last thread created returns an MVar to share with the first thread. Each thread reads from the MVar to its left, and writes to the MVar to its right.

Each thread then waits on a token to be passed from its neighbour. Tokens are then passed around the threads via the MVar chain N times, and the thread id of the final thread to receive a token is printed.

More information on Haskell concurrency and parallelism.

 thread-ring Haskell GHC #3 program source code

 make, command-line, and program output logs

Revised BSD license

  Home   Conclusions   License   Play