performance measurements

Each table row shows performance measurements for this F# Mono program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
500,0000.630.6446,248267  2% 5% 97% 0%
5,000,0000.750.7543,412267  8% 5% 92% 1%
50,000,0001.901.9150,976267  2% 99% 1% 1%

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.


F# Compiler for F# 3.1 (Open Source Edition)

Mono JIT compiler version 4.3.0 (master/54e8010 Sun May 31 13:36:15 PDT 2015)
LLVM: yes(3.6.0svn-mono-master/ce4fcec)
GC: sgen

 thread-ring F# Mono #4 program source code

(*  The Computer Language Benchmarks Game

    contributed by Jomo Fisher
    modified by Kostas Rontogiannis

    Using an array of Async<unit> for the workers and
    a shared token between threads.

    Compile : 
        fsc --tailcalls+ -O --platform:x64 ThreadRingNew.fs -o ThreadRingNew.exe
    Execute :
        mono ThreadRingNew.exe 50000000

let NumberOfThreads = 503

let mutable (workers : Async<unit>[]) = null
let mutable token = -1

let createWorker i = 
    let next = (i + 1) % NumberOfThreads
    async { if token = 0 then 
                printfn "%d" (i + 1)
                exit 0 
                token <- token - 1
                return! workers.[next] }

let main args = 
    token   <- int args.[0]
    workers <- Array.init NumberOfThreads createWorker

 make, command-line, and program output logs

Sun, 31 May 2015 22:38:49 GMT

mv threadring.fsharp-4.fsharp threadring.fsharp-4.fs
/usr/local/bin/fsharpc --target:exe --platform:x64 -O  -o threadring.fsharp-4.fsharp_run.exe threadring.fsharp-4.fs
F# Compiler for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License

/home/dunham/benchmarksgame_quadcore/threadring/tmp/threadring.fsharp-4.fs(16,1): warning FS0221: The declarations in this file will be placed in an implicit module 'Threadring.fsharp-4' based on the file name 'threadring.fsharp-4.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.
rm threadring.fsharp-4.fs
3.87s to complete and log all make actions

/usr/local/bin/mono --llvm --gc=sgen threadring.fsharp-4.fsharp_run.exe 50000000


Revised BSD license

  Home   Conclusions   License   Play