Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2017 |
---|---|
License | GPL-3 |
Maintainer | ecrockett0@email.com |
Stability | experimental |
Portability | POSIX \( \def\C{\mathbb{C}} \) |
Safe Haskell | None |
Language | Haskell2010 |
Benchmarks for individual layers of the Lol stack (Tensor, CycRep, Cyc), plus default parameters and helper functions for diplaying results.
Synopsis
- defaultLolBenches :: (forall m r. (Fact m, NFData r) => NFData (t m r), _) => Proxy t -> Proxy h -> [Benchmark]
- oneIdxBenches :: forall t m r gen. _ => Proxy '(m, r) -> Proxy t -> Proxy gen -> Benchmark
- twoIdxBenches :: forall t m m' r. _ => Proxy '(m, m', r) -> Proxy t -> Benchmark
- tensorBenches1 :: forall (t :: Factored -> * -> *) (m :: Factored) (r :: *) gen. (Fact m, _) => Proxy '(t, m, r) -> Proxy gen -> Benchmark
- tensorBenches2 :: forall (t :: Factored -> * -> *) (m :: Factored) (m' :: Factored) (r :: *). _ => Proxy '(t, m, m', r) -> Benchmark
- cycRepBenches1 :: forall t m r gen. _ => Proxy '(t, m, r) -> Proxy gen -> Benchmark
- cycRepBenches2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Benchmark
- cycBenches1 :: forall t m r gen. _ => Proxy '(t, m, r) -> Proxy gen -> Benchmark
- cycBenches2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Benchmark
- mkBench :: NFData b => String -> (a -> b) -> a -> Benchmark
- mkBenchIO :: NFData b => String -> IO b -> Benchmark
- bgroup :: String -> [Benchmark] -> Benchmark
- data Benchmark
- module Crypto.Lol.Utils.ShowType
- data Verb
- prettyBenchesTable :: TableOpts -> Benchmark -> IO ()
- defaultTableOpts :: Maybe String -> TableOpts
- data TableOpts = TOpts {}
- prettyBenchesDiagnostic :: DiagnosticOpts -> Benchmark -> IO ()
- defaultDiagnosticOpts :: DiagnosticOpts
- data DiagnosticOpts = DOpts {}
Default parameters for benchmarks
defaultLolBenches :: (forall m r. (Fact m, NFData r) => NFData (t m r), _) => Proxy t -> Proxy h -> [Benchmark] Source #
Benchmark parameters reported in the paper. We suggest running these benchmarks
to quickly compare performance on your system or with your
Tensor
backend.
oneIdxBenches :: forall t m r gen. _ => Proxy '(m, r) -> Proxy t -> Proxy gen -> Benchmark Source #
Collection of all single-index operations at all levels of the library.
twoIdxBenches :: forall t m m' r. _ => Proxy '(m, m', r) -> Proxy t -> Benchmark Source #
Collection of all inter-ring operations at all levels of the library.
Benchmarks for different layers of Lol
tensorBenches1 :: forall (t :: Factored -> * -> *) (m :: Factored) (r :: *) gen. (Fact m, _) => Proxy '(t, m, r) -> Proxy gen -> Benchmark Source #
Benchmarks for single-index Tensor
operations.
There must be a CRT basis for \(O_m\) over r
.
These cover the same functions as cycBenches1
, but may have different
performance due to how GHC interacts with Lol.
tensorBenches2 :: forall (t :: Factored -> * -> *) (m :: Factored) (m' :: Factored) (r :: *). _ => Proxy '(t, m, m', r) -> Benchmark Source #
Benchmarks for inter-ring Tensor
operations.
There must be a CRT basis for \(O_{m'}\) over r
.
These cover the same functions as cycBenches1
, but may have different
performance due to how GHC interacts with Lol.
cycRepBenches1 :: forall t m r gen. _ => Proxy '(t, m, r) -> Proxy gen -> Benchmark Source #
Benchmarks for single-index CycRep
operations.
There must be a CRT basis for \(O_m\) over r
.
These cover the same functions as cycBenches1
, but may have different
performance due to how GHC interacts with Lol.
cycRepBenches2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Benchmark Source #
Benchmarks for inter-ring CycRep
operations.
There must be a CRT basis for \(O_{m'}\) over r
.
These cover the same functions as cycBenches2
, but may have different
performance due to how GHC interacts with Lol.
cycBenches1 :: forall t m r gen. _ => Proxy '(t, m, r) -> Proxy gen -> Benchmark Source #
Benchmarks for single-index Cyc
operations.
There must be a CRT basis for \(O_m\) over r
.
cycBenches2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Benchmark Source #
Benchmarks for inter-ring Cyc
operations.
There must be a CRT basis for \(O_{m'}\) over r
.
Utilities for creating benchmarks
mkBench :: NFData b => String -> (a -> b) -> a -> Benchmark Source #
Make a Benchmark
from a function and its input
mkBenchIO :: NFData b => String -> IO b -> Benchmark Source #
Make a Benchmark
from an IO function and its input
:: String | A name to identify the group of benchmarks. |
-> [Benchmark] | Benchmarks to group under this name. |
-> Benchmark |
Group several benchmarks together under a common name.
Specification of a collection of benchmarks and environments. A benchmark may consist of:
- An environment that creates input data for benchmarks, created
with
env
. - A single
Benchmarkable
item with a name, created withbench
. - A (possibly nested) group of
Benchmark
s, created withbgroup
.
Utilities for showing benchmark results
module Crypto.Lol.Utils.ShowType
Verbosity of benchmark output.
prettyBenchesTable :: TableOpts -> Benchmark -> IO () Source #
Takes benchmark options an a benchmark group nested as params/level/op, and prints a table comparing operations across all selected levels of Lol.
Options for the simple benchmark format.
TOpts | Character width of row labels |
|
prettyBenchesDiagnostic :: DiagnosticOpts -> Benchmark -> IO () Source #
Takes benchmark options an a benchmark group nested as params/level/op, and prints a table comparing operations across all selected levels of Lol.
defaultDiagnosticOpts :: DiagnosticOpts Source #
Runs all benchmarks with verbosity Progress
.
data DiagnosticOpts Source #
Options for the diagnostic benchmark printout.
DOpts | Character width of row labels |
|