Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Benchmark] Reduce the number of benchmarks #6328

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plutus-benchmark/lists/bench/Bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ benchmarks ctx =
mkBMsForSort name f =
bgroup name $ sizesForSort <&> \n ->
bench (show n) $ benchTermCek ctx (f n)
sizesForSort = [10, 20..500]
sizesForSort = [50, 100..300]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea. I think the lists benchmarks take a very long time (I'll run them to check), so reducing the number of cases might speed things up significantly.

mkBMsForSum name f =
bgroup name $ sizesForSum <&> \n ->
bench (show n) $ benchTermCek ctx (f [1..n])
sizesForSum = [10, 50, 100, 500, 1000, 5000, 10000]
sizesForSum = [100, 500, 1000, 2500, 5000]

main :: IO ()
main = do
Expand Down
3 changes: 0 additions & 3 deletions plutus-benchmark/nofib/bench/Shared.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ mkBenchMarks (benchClausify, benchKnights, benchPrime, benchQueens) = [
, bench "8x8" $ benchKnights 100 8
]
, bgroup "primetest" [ bench "05digits" $ benchPrime Prime.P5
, bench "08digits" $ benchPrime Prime.P8
, bench "10digits" $ benchPrime Prime.P10
, bench "20digits" $ benchPrime Prime.P20
, bench "30digits" $ benchPrime Prime.P30
, bench "40digits" $ benchPrime Prime.P40
, bench "50digits" $ benchPrime Prime.P50
-- Larger primes are available in Primes.hs, but may take a long time.
]
Expand Down