diff options
Diffstat (limited to 'base64/Makefile')
| -rw-r--r-- | base64/Makefile | 56 |
1 files changed, 11 insertions, 45 deletions
diff --git a/base64/Makefile b/base64/Makefile index 611abcf..629c734 100644 --- a/base64/Makefile +++ b/base64/Makefile @@ -1,45 +1,11 @@ -# -# Some GHC flags explained -# -# -v verbose mode -# -O2 level 2 optimizations -# -rtsopts allow +RTS flags -# -prof enable basic time and allocation profiling -# -auto-all cost centers on all top level functions -# (you can also add them via the SCC pragma) -# -caf-all generate data for CAFs (constant applicative forms) -# t -# -fforce-recomp force recompilation -# -# Notes: you will obtain the profiling versions of dependancies via: -# stack install --profile [libraryname] -# -# -fprof-auto replaced -auto-all -# -fprof-cafs replaced -caf-all -# - -build-prof: - stack ghc --profile -- -rtsopts -prof -fprof-auto -fprof-cafs -O2 base64.hs - -# -# Some +RTS flags -# -# -p profiling -# -K set stack limit -# -hc extract heap profile -# -hy allocation by type -# -hd allocation by constructor -# -iN sampling frequency in seconds. e.g. -i0.01 -# -ddump-simpl generate core version -# -# Note: render the heap profile as graph with: hp2ps -e8in -c file.hp -# - -run-prof: - cat random.bin | ./base64 +RTS -p -K100M > /dev/null - - -test-mini-hask: - stack ghc -- -O mini.hs -test-mini-c: - gcc -O3 mini.c -o mini.out +run: base64 + ./base64 10 100 +RTS -N2 + #cat /tmp/random.bin | ./base64 +RTS -N6 > /dev/null +run-prof: base64prof + cat /tmp/random.bin | ./base64prof +RTS -N6 -p -s > /dev/null +base64: base64.hs + stack ghc -- -O2 base64.hs -threaded -o base64 +base64prof: base64.hs + stack ghc -- -threaded -rtsopts -prof -fprof-auto -fprof-cafs -O2 base64.hs -o base64prof +genrandom: + dd if=/dev/urandom of=/tmp/random.bin bs=1M count=64 |
