on master help sign in
Performance improvements by not taunting the 6.10 inliner.
2a9d765Bryan O'Sullivan
Data/Text/Encoding/Fusion.hs−1
@@ -67,7 +67,6 @@ streamUtf8 :: OnDecodeError -> ByteString -> Stream Char
67streamUtf8 onErr bs = Stream next 0 (maxSize l)
67streamUtf8 onErr bs = Stream next 0 (maxSize l)
68 where
68 where
69 l = B.length bs
69 l = B.length bs
70− {-# INLINE next #-}
71 next i
70 next i
72 | i >= l = Done
71 | i >= l = Done
73 | U8.validate1 x1 = Yield (unsafeChr8 x1) (i+1)
72 | U8.validate1 x1 = Yield (unsafeChr8 x1) (i+1)
Data/Text/Fusion/Common.hs−2
@@ -775,7 +775,6 @@ indexI (Stream next s0 _len) n0
775filter :: (Char -> Bool) -> Stream Char -> Stream Char
775filter :: (Char -> Bool) -> Stream Char -> Stream Char
776filter p (Stream next0 s0 len) = Stream next s0 len -- HINT maybe too high
776filter p (Stream next0 s0 len) = Stream next s0 len -- HINT maybe too high
777 where
777 where
778− {-# INLINE next #-}
779 next !s = case next0 s of
778 next !s = case next0 s of
780 Done -> Done
779 Done -> Done
781 Skip s' -> Skip s'
780 Skip s' -> Skip s'
@@ -819,7 +818,6 @@ zipWith :: (a -> a -> b) -> Stream a -> Stream a -> Stream b
819zipWith f (Stream next0 sa0 len1) (Stream next1 sb0 len2) =
818zipWith f (Stream next0 sa0 len1) (Stream next1 sb0 len2) =
820 Stream next (sa0 :*: sb0 :*: N) (smaller len1 len2)
819 Stream next (sa0 :*: sb0 :*: N) (smaller len1 len2)
821 where
820 where
822− {-# INLINE next #-}
823 next (sa :*: sb :*: N) = case next0 sa of
821 next (sa :*: sb :*: N) = case next0 sa of
824 Done -> Done
822 Done -> Done
825 Skip sa' -> Skip (sa' :*: sb :*: N)
823 Skip sa' -> Skip (sa' :*: sb :*: N)