Bryan O'Sullivan  committed dd645a1

Add another useful SCC annotation

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

  • Participants
  • Parent commits 13ef62e

Comments (0)

Files changed (1)

File Data/Aeson/Encode.hs

         one (k,v) = string k `mappend` Char8.fromChar ':' `mappend` fromValue v
 string :: T.Text -> Builder
-string s = Char8.fromChar '"' `mappend` (quote s) `mappend` Char8.fromChar '"'
+string s = {-# SCC "string" #-}
+           Char8.fromChar '"' `mappend` quote s `mappend` Char8.fromChar '"'
     quote q = case T.uncons t of
                 Just (c,t') -> fromText h `mappend` escape c `mappend` quote t'