{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE TypeApplications #-} module Main where import Test.Tasty.Bench import Data.Array.Nested main :: IO () main = defaultMain [bgroup "Num" [bench "sum(+) Double [1e6]" $ let n = 1_000_000 in nf (\(a, b) -> runScalar (rsumOuter1 (a + b))) (riota @Double n, riota n) ,bench "sum(*) Double [1e6]" $ let n = 1_000_000 in nf (\(a, b) -> runScalar (rsumOuter1 (a + b))) (riota @Double n, riota n)]]