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
12Failed  515   

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

Read binary-trees 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 22:58:47 PDT 2015)
LLVM: yes(3.6.0svn-mono-master/ce4fcec)
GC: sgen

 binary-trees F# Mono #2 program source code

// The Computer Language Benchmarks Game
// Minor modification by Don Syme & Jomo Fisher to use null as representation
// of Empty node.
// Based on F# version by Robert Pickering
// Based on ocaml version by Troestler Christophe & Isaac Gouy

type Tree<'T> = 
    | Empty 
    | Node of Tree<'T> * 'T * Tree<'T>

let rec make i d =
    if d = 0 then 
        Node(Empty, i, Empty)
        let i2 = 2 * i
        let d = d - 1
        Node(make (i2 - 1) d, i, make i2 d)

let rec check x = 
    match x with 
    | Empty -> 0 
    | Node(l, i, r) -> i + check l - check r

let rec loopDepths maxDepth minDepth d =
    if d <= maxDepth then
        let niter = 1 <<< (maxDepth - d + minDepth)
        let mutable c = 0
        for i = 1 to niter do 
            c <- c + check (make i d) + check (make (-i) d)
        printf "%i\t trees of depth %i\t check: %i\n" (2 * niter) d c
        loopDepths maxDepth minDepth (d + 2)

let main args =
    let minDepth = 4
    let maxDepth =
        let n = if args.Length > 0 then int args.[0] else 10
        max (minDepth + 2) n
    let stretchDepth = maxDepth + 1

    let c = check (make 0 stretchDepth)
    printf "stretch tree of depth %i\t check: %i\n" stretchDepth c
    let longLivedTree = make 0 maxDepth
    loopDepths maxDepth minDepth minDepth
    printf "long lived tree of depth %i\t check: %i\n" 
           (check longLivedTree)

 make, command-line, and program output logs

Fri, 22 May 2015 04:23:29 GMT

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

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

/usr/local/bin/mono --llvm binarytrees.fsharp-2.fsharp_run.exe 12



mono: /usr/local/src/llvm/include/llvm/IR/Instructions.h:999: void llvm::ICmpInst::AssertOK(): Assertion `getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!"' failed.

  at <unknown> <0xffffffff>
  at Microsoft.FSharp.Core.PrintfModule.PrintFormatToTextWriter<T_REF> (System.IO.TextWriter,Microsoft.FSharp.Core.PrintfFormat`4<T_REF, System.IO.TextWriter, Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.Unit>) <0x00047>
  at Binarytrees.fsharp-2.main (string[]) <0x00088>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/usr/local/bin/mono() [0x61d0e0]
	/lib/x86_64-linux-gnu/ [0x7fb9ae064d10]
	/lib/x86_64-linux-gnu/ [0x7fb9adaa9267]
	/lib/x86_64-linux-gnu/ [0x7fb9adaaaeca]
	/lib/x86_64-linux-gnu/ [0x7fb9adaa203d]
	/lib/x86_64-linux-gnu/ [0x7fb9adaa20f2]
	/usr/local/bin/mono() [0x7da6c6]
	/usr/local/bin/mono(LLVMBuildICmp+0x47) [0x112b6c7]
	/usr/local/bin/mono() [0x658617]
	/usr/local/bin/mono() [0x6922b9]
	/usr/local/bin/mono() [0x6930b7]
	/usr/local/bin/mono() [0x59ee7c]
	/usr/local/bin/mono() [0x59f4bb]
	/usr/local/bin/mono() [0x61e370]

Debug info from gdb:

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.

Revised BSD license

  Home   Conclusions   License   Play