Skip to content
Permalink
Browse files

Second implementation, with Fisher-Yates on bits

❯ time .stack-work/install/x86_64-osx/lts-13.21/8.6.5/bin/bingo-sim 100000
Trials:   100000
Bingos:   3529
Hit rate: 0.03529
    0.71s user 0.02s system 98% cpu 0.738 total
  • Loading branch information...
jez committed May 19, 2019
1 parent 994481b commit 8886a660e91c48d18b11add72ff5894db46e24da
Showing with 211 additions and 29 deletions.
  1. +2 −4 bingo-sim.cabal
  2. +1 −2 package.yaml
  3. +162 −0 prof/bingo-sim.2.prof
  4. +46 −23 src/BingoSim/Simulation.hs
@@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: b0e67a2eb9d86d2863fe5c9d113188176f9b2e23ff22eb6072d87707b03a902b
-- hash: 26378589030ced4d8f54066cd640d122b18b9474d2082849b5a315cade4a9319

name: bingo-sim
version: 0.0.1.0
version: 0.0.2.0
synopsis: A small playground to learn about profiling Haskell.

description: This package simulates the probability of scoring a bingo at a particular children's carnival game. I've been using it to learn how profiling in Haskell works.
@@ -34,7 +34,6 @@ library
build-depends:
base >=4.7 && <5
, random
, random-shuffle
default-language: Haskell2010

executable bingo-sim
@@ -48,5 +47,4 @@ executable bingo-sim
base >=4.7 && <5
, bingo-sim
, random
, random-shuffle
default-language: Haskell2010
@@ -1,5 +1,5 @@
name: bingo-sim
version: 0.0.1.0
version: 0.0.2.0
homepage: https://github.com/jez/bingo-sim
author: Jake Zimmerman
maintainer: zimmerman.jake@gmail.com
@@ -29,7 +29,6 @@ ghc-options:
dependencies:
- base >=4.7 && <5
- random
- random-shuffle

library:
source-dirs: src

0 comments on commit 8886a66

Please sign in to comment.
You can’t perform that action at this time.