Significant runtime regression in HEAD/8.10 for this benchmark.
This goes from <= 10ms to > 100ms between 8.10 and 9.0/head.
{-# OPTIONS_GHC -fforce-recomp -ddump-to-file -ddump-stg-final -ddump-cmm -ddump-simpl -O #-}
{-# OPTIONS_GHC -dsuppress-all #-}
module Main where
import Data.Set as Set
import GHC.Magic
{-# NOINLINE list #-}
list :: [Int]
list = [1..50000 :: Int]
{-# NOINLINE set #-}
set :: Set Int
set = fromList list
-- list :: [Int]
-- list = [1..1000000 :: Int]
main :: IO ()
main = do
print $ and $ fmap (all (\x -> (noinline Set.member) x set)) (replicate 500 list)
I suspect something is amiss with changes to Enum handling. But it's not completely clear yet.
The noinline is not required to witness the regression, nor are the NOINLINE pragmas. They just make the core easer to inspect.
Allocations between the versions don't differ significantly. This happens both on windows and linux.