Can I write my own streaming fusion in a library in Haskell?

I experimented with the Vector library to see thread merging in action, and this is a very impressive optimization. I am curious to know how difficult it would be to create my own thread merge library? I'm just wondering if there are any special things that I need to do, such as using certain pragmas, etc.

+4
source share
1 answer

Fusion is mainly executed by your compiler optimizer under the control of the INLINE / INLINABLE and RULES pragmas.

(Hugs still supported? I guess not.)

Haskell ; Haskell (GHC JHC), .

, , . Haskell , , . , , . INLINE/INLINABLE RULES , Haskell .

0

Source: https://habr.com/ru/post/1534668/


All Articles