Skip to content

Commit

Permalink
Add missing permutation benchmark to *-papi (#515)
Browse files Browse the repository at this point in the history
A backpack, A backpack, My kingdom for a backpack!
  • Loading branch information
Shimuuar authored Nov 1, 2024
1 parent d9d0d46 commit 141449b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vector-bench-papi/benchmarks/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Bench.Vector.Algo.Quickhull (quickhull)
import Bench.Vector.Algo.Spectral (spectral)
import Bench.Vector.Algo.Tridiag (tridiag)
import Bench.Vector.Algo.FindIndexR (findIndexR, findIndexR_naive, findIndexR_manual)
import Bench.Vector.Algo.NextPermutation (generatePermTests)

import Bench.Vector.TestData.ParenTree (parenTree)
import Bench.Vector.TestData.Graph (randomGraph)
Expand Down Expand Up @@ -49,6 +50,7 @@ main = do
!ds <- randomVector useSize
!sp <- randomVector (floor $ sqrt $ fromIntegral useSize)
vi <- MV.new useSize
permTests <- generatePermTests gen useSize

defaultMainWithIngredients ingredients $ bgroup "All"
[ bench "listRank" $ whnf listRank useSize
Expand All @@ -65,4 +67,5 @@ main = do
, bench "findIndexR_manual" $ whnf findIndexR_manual ((<indexFindThreshold), as)
, bench "minimumOn" $ whnf (U.minimumOn (\x -> x*x*x)) as
, bench "maximumOn" $ whnf (U.maximumOn (\x -> x*x*x)) as
, bgroup "(next|prev)Permutation" $ map (\(name, act) -> bench name $ whnfIO act) permTests
]

0 comments on commit 141449b

Please sign in to comment.