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.880.8945,680329  1% 1% 0% 99%
5,000,0002.522.5344,712329  1% 1% 1% 100%
50,000,00019.7219.7454,240329  0% 0% 1% 100%

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.1.0 (master/435cc01 Wed May 20 21:03:41 PDT 2015)
LLVM: yes(3.6.0svn-mono-master/ce4fcec)
GC: sgen

 thread-ring F# Mono #3 program source code

(*  The Computer Language Benchmarks Game

    Contributed by Jomo Fisher

    Uses F# asyncs. Asyncs are triggered by tailcall in sequence as progress is 
    made around the ring. 
let ringLength = 503

let cells = Array.zeroCreate ringLength
let threads = Array.zeroCreate ringLength
let answer = ref -1

let createWorker i = 
    let next = (i+1)%ringLength
    async { let value = cells.[i]
            if false then () 
            match value with
            | 0 -> answer := i+1
            | _ -> 
                cells.[next] <- value - 1 
                return! threads.[next] }
let main args = 
    cells.[0] <- if args.Length>0 then int args.[0] else 50000000
    for i in 0..ringLength-1 do 
        threads.[i]<-createWorker i

    let result = Async.StartImmediate(threads.[0])
    printfn "%d" !answer

 make, command-line, and program output logs

Fri, 22 May 2015 02:32:26 GMT

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

/home/dunham/benchmarksgame_onecore/threadring/tmp/threadring.fsharp-3.fs(9,1): warning FS0221: The declarations in this file will be placed in an implicit module 'Threadring.fsharp-3' based on the file name 'threadring.fsharp-3.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-3.fs
4.01s to complete and log all make actions

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


Revised BSD license

  Home   Conclusions   License   Play