on master help sign in
Add another useful SCC annotation

This lets us see the cost of string encoding more clearly.

commit4100863da63e66e9a89ba3df3ffd33101820aed9 authorBryan O'Sullivan <bos@serpentine.com> dateFri 23 Dec 2011, 12:54 (15 years ago) parent0354704
1 file changed+2−1
Data/Aeson/Encode.hs+2−1
Data/Aeson/Encode.hs+2−1
@@ -55,7 +55,8 @@ fromValue (Object m) = {-# SCC "fromValue/Object" #-}
5555 one (k,v) = string k `mappend` Char8.fromChar ':' `mappend` fromValue v
5656
5757string :: T.Text -> Builder
58−string s = Char8.fromChar '"' `mappend` (quote s) `mappend` Char8.fromChar '"'
58+string s = {-# SCC "string" #-}
59+ Char8.fromChar '"' `mappend` quote s `mappend` Char8.fromChar '"'
5960 where
6061 quote q = case T.uncons t of
6162 Just (c,t') -> fromText h `mappend` escape c `mappend` quote t'