[commit: random] master: Cleaned up the simple benchmark and added tests for non-Int datatypes. The results are a bit surprising. Float generation is performing badly. (d9a5313)

Ian Lynagh igloo at earth.li
Sun Jun 26 15:55:41 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/random

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d9a5313593b53655f6024105c7122cae71ca4042

>---------------------------------------------------------------

commit d9a5313593b53655f6024105c7122cae71ca4042
Author: Ryan Newton <rrnewton at gmail.com>
Date:   Fri Jun 24 18:22:26 2011 -0400

    Cleaned up the simple benchmark and added tests for non-Int datatypes.  The results are a bit surprising.  Float generation is performing badly.
    
    Here are some results from a 3.33ghz Intel Nehalem:
    
      Cost of rdtsc (ffi call):    75
      Approx getCPUTime calls per second: 206,493
      Approx clock frequency:  3,336,174,789
      First, timing with System.Random interface:
        112,276,629 randoms generated [constant zero gen]         ~ 29.71 cycles/int
         14,289,712 randoms generated [System.Random stdGen]      ~ 233 cycles/int
             82,546 randoms generated [System.Random Floats]      ~ 40,416 cycles/int
             83,138 randoms generated [System.Random CFloats]     ~ 40,128 cycles/int
          2,533,007 randoms generated [System.Random Doubles]     ~ 1,317 cycles/int
            841,737 randoms generated [System.Random Integers]    ~ 3,963 cycles/int
          4,704,318 randoms generated [System.Random Bools]       ~ 709 cycles/int

 Benchmark/SimpleRNGBench.hs |  193 ++++++++++++++++---------------------------
 1 files changed, 73 insertions(+), 120 deletions(-)


Diff suppressed because of size. To see it, use:

    git show d9a5313593b53655f6024105c7122cae71ca4042



More information about the Cvs-libraries mailing list