Skip to content

Instantly share code, notes, and snippets.


Piyush P Kurur piyush-kurur

View GitHub Profile
View gist:5347ea9803f96e98ab7cc59e27689a41
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
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 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
time = 845.6 ns
cycles = 2698.5775
rate = 0.31Tbps
piyush-kurur / opensslVsRaaz
Last active Jun 29, 2017
Open SSL vs Raaz on BLAKE2 performance
View opensslVsRaaz
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
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 *)
piyush-kurur / After-Auto-vectorisation
Last active Feb 6, 2017
Performance figure of primitives supported by raaz-0.1.0
View After-Auto-vectorisation
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
time = 545.5 ns
cycles = 1849.2347
rate = 0.48Tbps
piyush-kurur / gist:0dd772a80d25d345359de335141f0050
Created Oct 2, 2016
Result of compiling yi and the errors
View gist:0dd772a80d25d345359de335141f0050
$ 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):
- 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