Commits

Bryan O'Sullivan committed 2be112c

Minor performance improvements.

Comments (0)

Files changed (1)

Data/Attoparsec/FastSet.hs

 import Data.Word (Word8)
 import Foreign.Storable (peekByteOff, pokeByteOff)
 
-data FastSet = Sorted { fromSet :: {-# UNPACK #-} !B.ByteString }
-             | Table  { fromSet :: {-# UNPACK #-} !B.ByteString }
+data FastSet = Sorted { fromSet :: !B.ByteString }
+             | Table  { fromSet :: !B.ByteString }
     deriving (Eq, Ord)
 
 instance Show FastSet where
 -- characters above code point 255 will give wrong answers.
 memberChar :: Char -> FastSet -> Bool
 memberChar c = memberWord8 (I.c2w c)
+{-# INLINE memberChar #-}
 
 mkTable :: B.ByteString -> B.ByteString
 mkTable s = I.unsafeCreate 32 $ \t -> do