From 7da090cd9ad3c032a3d3168bed12a5f89b3f86d7 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 29 Oct 2007 15:07:30 +0000 Subject: [PATCH] Fix performance regression: re-instate -funbox-strict-fields Yikes! While investigating the increase in code size with GHC 6.8 relative to 6.6, I noticed that in the transition to Cabal for the libraries we lost -funbox-strict-fields, which is more or less depended on by the IO library for performance. I'm astonished that we didn't notice this earlier! To reduce the chances of this happening again, I put -funbox-strict-fields in the OPTIONS_GHC pragma of the modules that need it. {-# UNPACK #-} pragmas would be better, though. --- Data/HashTable.hs | 2 +- Data/Typeable.hs | 2 +- GHC/Arr.lhs | 2 +- GHC/IOBase.lhs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/HashTable.hs b/Data/HashTable.hs index cb11e15..3db6cc9 100644 --- a/Data/HashTable.hs +++ b/Data/HashTable.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | diff --git a/Data/Typeable.hs b/Data/Typeable.hs index f548dc9..b61960f 100644 --- a/Data/Typeable.hs +++ b/Data/Typeable.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-implicit-prelude -fallow-overlapping-instances #-} +{-# OPTIONS_GHC -fno-implicit-prelude -fallow-overlapping-instances -funbox-strict-fields #-} -- The -fallow-overlapping-instances flag allows the user to over-ride -- the instances for Typeable given here. In particular, we provide an instance diff --git a/GHC/Arr.lhs b/GHC/Arr.lhs index 25505fc..2c23faa 100644 --- a/GHC/Arr.lhs +++ b/GHC/Arr.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -fno-implicit-prelude -fno-bang-patterns #-} +{-# OPTIONS_GHC -fno-implicit-prelude -fno-bang-patterns -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Arr diff --git a/GHC/IOBase.lhs b/GHC/IOBase.lhs index 3f93ef9..3b82a52 100644 --- a/GHC/IOBase.lhs +++ b/GHC/IOBase.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IOBase -- 1.7.10.4