Skip to content

Instantly share code, notes, and snippets.

View duog's full-sized avatar

Doug Wilson duog

View GitHub Profile
@duog
duog / nofib
Last active March 31, 2021 12:59
# compiler allocations
## no samples
# compiler mutator time
## no samples
# compiler GC (cpu) time
> /tmp/stackage-build9$ stack unpack Boolean-0.2.4@gitsha1:ad2654046e3860dd3e5d0f0ce9f506964eb71586
Unpacked Boolean-0.2.4 to /tmp/stackage-build9/Boolean-0.2.4/
> /tmp/stackage-build9/Boolean-0.2.4$ ghc -clear-package-db -global-package-db -package-db=/home/doug/ghc-dev/build-stackage/work/pkgdb Setup
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
> /tmp/stackage-build9/Boolean-0.2.4$ ./Setup configure --package-db=clear --package-db=global --package-db=/home/doug/ghc-dev/build-stackage/work/pkgdb --libdir=/home/doug/ghc-dev/build-stackage/work/lib --bindir=/home/doug/ghc-dev/build-stackage/work/bin --datadir=/home/doug/ghc-dev/build-stackage/work/share --libexecdir=/home/doug/ghc-dev/build-stackage/work/libexec --sysconfdir=/home/doug/ghc-dev/build-stackage/work/etc --docdir=/home/doug/ghc-dev/build-stackage/work/doc/Boolean-0.2.4 --htmldir=/home/doug/ghc-dev/build-stackage/work/doc/Boolean-0.2.4 --haddockdir=/home/doug/ghc-dev/build-stackage/work/doc/Boolean-0.2.4 --flags= --en
@duog
duog / after
Created August 31, 2017 02:39
data-bitstream benchmark results
benchmarking synthetic/50
time 64.12 μs (63.54 μs .. 64.64 μs)
0.999 R² (0.998 R² .. 0.999 R²)
mean 64.73 μs (64.47 μs .. 64.94 μs)
std dev 750.6 ns (626.6 ns .. 906.5 ns)
benchmarking synthetic/100
time 293.8 μs (291.9 μs .. 295.8 μs)
0.998 R² (0.996 R² .. 1.000 R²)
mean 302.2 μs (297.8 μs .. 315.3 μs)
@duog
duog / doctest.cabal
Created August 24, 2017 01:16
readGenericPackageDescription >>= writeGenericPackageDescription
name: doctest
version: 0.11.4
synopsis: Test interactive Haskell examples
description: The doctest program checks examples in source code comments.
It is modeled after doctest for Python
(<http://docs.python.org/library/doctest.html>).
.
Documentation is at
<https://github.com/sol/doctest#readme>.
category: Testing
@duog
duog / benchmark.sh
Last active August 10, 2017 04:12
Benchmark improve parallel --make
#!/usr/bin/env bash
# git clone https://github.com/ekmett/lens
# git checkout 9a7e43f80188a6e58edafa4b621b622a0a2d0a82
# cd lens
# be sure to do a cabal install first to get the packages downloaded
cabal sandbox delete -v0
Thu May 11 01:49 2017 Time and Allocation Profiling Report (Final)
haddock +RTS -tcompiler/stage2/haddock.t --machine-readable -p -RTS -B/home/ghc/inplace/lib -l/home/ghc/inplace/lib --verbosity=0 --odir=compiler/stage2/doc/html/ghc --no-tmp-comp-dir --dump-interface=compiler/stage2/doc/html/ghc/ghc.haddock --html --hoogle --title=ghc-8.3: The GHC API --prologue=compiler/stage2/haddock-prologue.txt --optghc=-D__HADDOCK_VERSION__=2173 --read-interface=../base-4.10.0.0,../base-4.10.0.0/src/%{MODULE/./-}.html#%{NAME},libraries/base/dist-install/doc/html/base/base.haddock --read-interface=../deepseq-1.4.3.0,../deepseq-1.4.3.0/src/%{MODULE/./-}.html#%{NAME},libraries/deepseq/dist-install/doc/html/deepseq/deepseq.haddock --read-interface=../directory-1.3.0.2,../directory-1.3.0.2/src/%{MODULE/./-}.html#%{NAME},libraries/directory/dist-install/doc/html/directory/directory.haddock --read-interface=../process-1.6.0.0,../process-1.6.0.0/src/%{MODULE/./-}.html#%{NAME},libraries/process/dist-install/doc/html/proces
Compile failed (exit code 1) errors were:
Doug: /tmp/ghc12813_0/ghc_1.hi
Doug: /tmp/ghc12813_0/ghc_1.dyn_hi
Doug: /tmp/ghc12813_0/ghc_1._hi
Doug: /tmp/ghc12813_0/ghc_2.o
Doug: /tmp/ghc12813_0/ghc_2.dyn_o
Doug: /tmp/ghc12813_0/ghc_2._o
[1 of 2] Compiling A ( A.hs, /tmp/ghc12813_0/ghc_2.o )
[2 of 2] Compiling B ( B.hs, nothing )
B.hs:5:5: fatal:
@duog
duog / Fast.hs
Last active April 12, 2017 02:38
template haskell with -fno-code benchmark scripts
{-# LANGUAGE TemplateHaskell#-}
module Fast where
import FastA
class AClass a
data B
data C
ex1 :: AClass c => c a -> B -> C -> c a
ex2
:: AClass c => c a -> B -> C -> c a
ex3 :: AClass c
=> c a -> B -> C