This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eu | |
stack ghc -- -O2 test4.hs -rtsopts | |
for n in 5000 50000 500000 5000000; do | |
for impl in roman michael base; do | |
printf "%7d %10s" $n $impl | |
./test4 $impl $n +RTS -s 2>&1|perl -lne '/(^.*bytes).*residency/&&print $1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compiler-check: match-exact | |
resolver: lts-7.10 | |
compiler: ghc-8.0.1.20161117 | |
setup-info: | |
ghc: | |
linux64: | |
8.0.1.20161117: | |
url: http://downloads.haskell.org/~ghc/8.0.2-rc1/ghc-8.0.1.20161117-x86_64-deb8-linux.tar.xz | |
content-length: 112047972 | |
sha1: 6a6e4c9c53c71cc84b6966a9f61948542fd2f15a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE RankNTypes #-} | |
module Data.Conduit.Concurrent where | |
import Control.Concurrent.Async | |
import Control.Concurrent.STM | |
import Control.Monad (forM_) | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.IORef as I | |
import qualified Control.Exception as E | |
import Control.Concurrent | |
import Control.Exception | |
import Control.Monad | |
import Network.Socket | |
main :: IO () | |
main = do | |
pairCount <- I.newIORef 0 |