vector-0.13.2.0: Efficient Arrays

Safe Haskell | None
Language | Haskell2010

Bench.Vector.Algo.NextPermutation

Synopsis

- generatePermTests :: StatefulGen g IO => g -> Int -> IO [(String, IO ())]

# Documentation

generatePermTests :: StatefulGen g IO => g -> Int -> IO [(String, IO ())] #

Generate a list of benchmarks for permutation algorithms. The list contains pairs of benchmark names and corresponding actions. The actions are to be executed by the benchmarking framework.

The list contains the following benchmarks: - `(next|prev)Permutation` on a small vector repeated until the end of the permutation cycle - Bijective versions of `(next|prev)Permutation` on a vector of size `n`, repeated `n` times - ascending permutation - descending permutation - random permutation - Baseline for bijective versions: just copying a vector of size `n`. Note that the tests for bijective versions begins with copying a vector.