pkgsrc-WIP-cvs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: wip/ocaml-pa_bench



Module name:	wip
Committed by:	jgoamakf
Date:		Thu Feb 26 16:02:45 UTC 2015

Modified Files:
	wip/ocaml-pa_bench: Makefile PLIST distinfo

Log Message:
Update ocaml-pa_bench to 112.06.00.

Changes from previous:
----------------------
- Made the code generated by `pa_bench` for `BENCH` not use `ignore`,
  because OCaml 4.02 will remove dead code in some cases, meaning the
  benchmarks are no longer measuring what they should.  Instead the ignore
  is deep inside `Core_bench`, which is likely out of reach of the
  compiler.

    The result of the user functions given to `BENCH_FUN` and
    `BENCH_INDEXED` are changed so they don't have to return unit and
    people are encouraged not to use `ignore` when these functions don't
    return `unit` (you will get the same warning though, i.e. a warning
    if the result of your function is a function too, thus preventing
    unintended partial applications).

    For example, here are a few benchmarks and their output before the
    fix:

        let x = if Random.bool () then 100 else 1001
        let r = ref 0
        BENCH "ig-1" = 10 / x
        BENCH "ig-2" = ()
        BENCH "ig-3" = phys_equal (10 / x) (Obj.magic 0)
        BENCH "ig-4" = r := (10 / x)
        BENCH "ig-5" = r := x

        +----------------+----------+------------+
        | Name           | Time/Run | Percentage |
        +----------------+----------+------------+
        | [misc.ml] ig-1 |   3.92ns |     29.30% |
        | [misc.ml] ig-2 |   3.34ns |     24.95% |
        | [misc.ml] ig-3 |   3.91ns |     29.23% |
        | [misc.ml] ig-4 |  13.37ns |    100.00% |
        | [misc.ml] ig-5 |   3.24ns |     24.20% |
        +----------------+----------+------------+

    Many of the the numbers above are much lower than they should be
    because of the implicit ignores inserted by the benchmark caused the
    division to to eliminated by the compiler. After the fix, the same
    benchmarks produced more meaningful numbers:

        +----------------+----------+------------+
        | Name           | Time/Run | Percentage |
        +----------------+----------+------------+
        | [misc.ml] ig-1 |  12.78ns |     94.55% |
        | [misc.ml] ig-2 |   3.23ns |     23.90% |
        | [misc.ml] ig-3 |  13.51ns |     99.94% |
        | [misc.ml] ig-4 |  13.52ns |    100.00% |
        | [misc.ml] ig-5 |   3.30ns |     24.40% |
        +----------------+----------+------------+


To generate a diff of this commit:
cvs -z3 rdiff -u -r1.1 -r1.2 wip/ocaml-pa_bench/Makefile \
    wip/ocaml-pa_bench/PLIST wip/ocaml-pa_bench/distinfo

To view a diff of this commit:
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/ocaml-pa_bench/Makefile?r1=1.1&r2=1.2
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/ocaml-pa_bench/PLIST?r1=1.1&r2=1.2
http://pkgsrc-wip.cvs.sourceforge.net/pkgsrc-wip/wip/ocaml-pa_bench/distinfo?r1=1.1&r2=1.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pkgsrc-wip-cvs mailing list
pkgsrc-wip-cvs%lists.sourceforge.net@localhost
https://lists.sourceforge.net/lists/listinfo/pkgsrc-wip-cvs


Home | Main Index | Thread Index | Old Index