@@ -412,7 +412,11 @@ deriveUnboxInternal preds headTy cons = do
412412 peekMethod <- mkPeekExpr headTy cons
413413 pokeMethod <- mkPokeExpr headTy cons
414414 let methods =
415− [ FunD 'sizeOf [Clause [WildP] (NormalB sizeOfMethod) []]
415+ -- INLINE on sizeOf actually worsens some benchmarks, and improves
416+ -- none
417+ [ -- PragmaD (InlineP 'sizeOf Inline FunLike AllPhases)
418+ FunD 'sizeOf [Clause [WildP] (NormalB sizeOfMethod) []]
419+ , PragmaD (InlineP 'peekByteIndex Inline FunLike AllPhases)
416420 , FunD
417421 'peekByteIndex
418422 [ Clause
@@ -422,6 +426,7 @@ deriveUnboxInternal preds headTy cons = do
422426 (NormalB peekMethod)
423427 []
424428 ]
429+ , PragmaD (InlineP 'pokeByteIndex Inline FunLike AllPhases)
425430 , FunD
426431 'pokeByteIndex
427432 [ Clause