Commits

Aleksey Khudyakov committed 6b977ef

Inline and eta reduce fillBuilderVec

It's necessary to ensure that fillBuilder gets inlined and specialized.
It improved benchmarks almost two times

Comments (0)

Files changed (1)

Data/Histogram/Fill.hs

 
 -- | Fill histogram builder.
 fillBuilderVec :: G.Vector v a => HBuilder a b -> v a -> b
-fillBuilderVec hb vec =
+{-# INLINE fillBuilderVec #-}
+fillBuilderVec hb = \vec ->
     runST $ do h <- toHBuilderST hb
                G.mapM_ (feedOne h) vec
                freezeHBuilderM h