View gist:5347ea9803f96e98ab7cc59e27689a41
This file contains 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
module Foo.Exports | |
( module Foo ) where | |
import Foo hiding ( Bar, Biz ) | |
import Foo (Bar, Biz) | |
-- The idea here is that I want to re-export everything from Foo except for the types Bar and Biz | |
-- whose constructors I want to hide |
View constructors and module variables
This file contains 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
Module Type Foo. | |
Variable t : Type. | |
Variable mkFoo : nat -> t. | |
End Foo. | |
Module NatFoo : Foo. | |
Inductive natfoo : Type := | |
| mkFoo : nat -> natfoo. |
View Performance of primtives benchmarks
This file contains 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
This is performace of various primitives exposed by raaz. All rates are in bits per sec and | |
for hashes are the rate of compression. Actual performance should expect some additional overheads. | |
Buffer Size = 32768 | |
Iterations = 10000 | |
memset | |
time = 845.6 ns | |
cycles = 2698.5775 | |
rate = 0.31Tbps |
View opensslVsRaaz
This file contains 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
OpenSSL vs Raaz on BLAKE2. | |
-------------------------- BLAKE2s -------------------------------------------------- | |
OpenSSL Run 1 | |
ppk% time dd if=/dev/zero bs=1024 count=5000000 | openssl dgst -blake2s256 | |
5000000+0 records in | |
5000000+0 records out | |
5120000000 bytes (5.1 GB, 4.8 GiB) copied, 10.8279 s, 473 MB/s |
View gist:e4be87b4d86d90eb1296d1b1faeaefc5
This file contains 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
Module Type MT. | |
Parameter foo : Type | |
Definition bar := foo -> foo | |
End MT. | |
Module M : MT. | |
Definition foo = nat | |
Definition bar = nat -> nat | |
(* error without the definition of bar *) |
View After-Auto-vectorisation
This file contains 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
Enable opt-vectorise and opt-native with cabal. Effectively adds the GCC Flags used -O2 -ftree-vectorize -march=native | |
Notice the jump in the performance of the portable C implementation. | |
Buffer Size = 32768 | |
Iterations = 10000 | |
memset | |
time = 545.5 ns | |
cycles = 1849.2347 | |
rate = 0.48Tbps |
View gist:0dd772a80d25d345359de335141f0050
This file contains 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
$ stack --stack-yaml lts-6.yaml install yi --flag yi:vty --flag yi:pango #installing with flags | |
Invalid flag specification: | |
- Package 'yi' does not define the following flags (specified on command line): | |
pango | |
vty | |
- Flags defined by package 'yi': | |
$ stack --stack-yaml lts-6.yaml install yi # installing without the flags | |
Copying from /home/ppk/code/git/yi/.stack-work/install/x86_64-linux/lts-6.19/7.10.3/bin/yi to /home/ppk/.local/bin/yi |