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
2,000Failed  513   

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

Read pidigits benchmark to see what this program should do.

 notes

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

Mono JIT compiler version 3.10.1 (master/0083728 Thu Sep 11 09:57:48 PDT 2014)
LLVM: yes(3.4svn-mono-mono/e656cac)
GC: sgen

 pidigits F# Mono program source code

// The Computer Language Benchmarks Game

// http://benchmarksgame.alioth.debian.org/

//

// contributed by Valentin Kraevskiy

// fixed by Joel Mueller


#light

    
let id = 1I, 0I, 0I, 1I

let comp (q, r, s, t) (u, v, x) =
    (q * u, q * v + r * x, s * u, s * v + t * x)

let div x y = 
    let rec next w n =        
        if w > x then n else next (w + y) (n + 1I)
    next y 0I
let extr (q, r, s, t) x = div (q * x + r) (s * x + t)   
    
let next z = extr z 3I
let safe z = (=) (extr z 4I)
let prod (u, v, w, x) n =
    let neg = -10I * n
    (10I * u + neg * w, 10I * v + neg * x, w, x)

let digits = 
    let z = ref id    
    let lfts = 
        let n = ref 0I
        fun () -> n := !n + 1I
                  !n, 4I * !n + 2I, 2I * !n + 1I
    let rec digits () =
            let y = next !z 
            if safe !z y 
                then z := (prod !z y)
                     y
                else z := (comp !z <| lfts ())
                     digits ()
    digits

let rec loop n s total = 
    if total = 0 
        then for _ in 1 .. n do printf " "
             printf ("\t:%i\n") (s + 10 - n)
        else if n = 0 
            then printf "\t:%i\n" <| s + 10
                 loop 10 (s + 10) total
            else printf "%i" <| int (digits ()) 
                 loop (n - 1) s (total - 1)

loop 10 0 <| try int (System.Environment.GetCommandLineArgs().[1]) with _ -> 27

 

 make, command-line, and program output logs

Fri, 12 Sep 2014 00:17:28 GMT

MAKE:
mv pidigits.fsharp pidigits.fs
/usr/local/bin/fsharpc --target:exe --platform:x64 -O  -o pidigits.fsharp_run.exe pidigits.fs
F# Compiler for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
rm pidigits.fs
3.72s to complete and log all make actions

COMMAND LINE:
/usr/local/bin/mono --llvm --gc=sgen pidigits.fsharp_run.exe 2000

PROGRAM FAILED 


PROGRAM OUTPUT:
* Assertion at mini-exceptions.c:2771, condition `info' not met

* Assertion at mini-exceptions.c:2771, condition `info' not met


Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Assembly.GetExecutingAssembly () <0xffffffff>

Revised BSD license

  Home   Conclusions   License   Play