Skip to content

Instantly share code, notes, and snippets.

View piyush-kurur's full-sized avatar

Piyush P Kurur piyush-kurur

View GitHub Profile
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
Module Type Foo.
Variable t : Type.
Variable mkFoo : nat -> t.
End Foo.
Module NatFoo : Foo.
Inductive natfoo : Type :=
| mkFoo : nat -> natfoo.
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
@piyush-kurur
piyush-kurur / opensslVsRaaz
Last active June 29, 2017 12:06
Open SSL vs Raaz on BLAKE2 performance
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
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
piyush-kurur / After-Auto-vectorisation
Last active February 6, 2017 12:43
Performance figure of primitives supported by raaz-0.1.0
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
@piyush-kurur
piyush-kurur / gist:0dd772a80d25d345359de335141f0050
Created October 2, 2016 04:16
Result of compiling yi and the errors
$ 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