File: MertensBench.hs

package info (click to toggle)
haskell-arithmoi 0.13.0.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 988 kB
  • sloc: haskell: 10,437; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# OPTIONS_GHC -fno-warn-type-defaults #-}

module Math.NumberTheory.MertensBench
  ( benchSuite
  ) where

import Test.Tasty.Bench

import Math.NumberTheory.ArithmeticFunctions.Mertens

mertensBench :: Word -> Benchmark
mertensBench n = bench (show n) (nf mertens n)

benchSuite :: Benchmark
benchSuite = bgroup "Mertens" $ map mertensBench $ take 4 $ iterate (* 10) 10000000