@@ -326,7 +326,11 @@ deriveSerializeInternal preds headTy cons = do
326 peekMethod <- mkDeserializeExpr headTy cons
326 peekMethod <- mkDeserializeExpr headTy cons
327 pokeMethod <- mkSerializeExpr headTy cons
327 pokeMethod <- mkSerializeExpr headTy cons
328 let methods =
328 let methods =
329+ -- INLINE on sizeOf actually worsens some benchmarks, and improves
331+ [ -- PragmaD (InlineP 'size Inline FunLike AllPhases)
329− [ FunD 'size [Clause [] (NormalB sizeOfMethod) []]
332+ FunD 'size [Clause [] (NormalB sizeOfMethod) []]
333+ , PragmaD (InlineP 'deserialize Inline FunLike AllPhases)
331 'deserialize
335 'deserialize
@@ -336,6 +340,7 @@ deriveSerializeInternal preds headTy cons = do
336 (NormalB peekMethod)
340 (NormalB peekMethod)
343+ , PragmaD (InlineP 'serialize Inline FunLike AllPhases)
340 'serialize
345 'serialize