2 ms·
It's quite interesting to see essencially the ideas used in stream fusion [1] to produce practically the same results produced in Haskell, avoiding allocations
by axman6 13y ago
It's quite interesting to see essencially the ideas used in stream fusion [1] to produce practically the same results produced in Haskell, avoiding allocations and often making it much easier for the compiter ro produce vectorised code. At least that's what it looks like to me, correct me if I'm wrong.
Edit: [3] has a good exlanation of how stream fusion works, and it should make it clearer why the linked code appears to be doing the same thing.
see also here[2] for a further paper on stream fusion being used to produce vectorised code. I've linked to the reddit comments because there's some useful discussion there too.
[1] http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.104.7401 http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.104.7...
[2] http://www.reddit.com/r/haskell/comments/1br0ls/haskell_beats_c_using_generalised_stream_fusion/ http://www.reddit.com/r/haskell/comments/1br0ls/haskell_beat...
[3] http://donsbot.wordpress.com/2008/06/04/haskell-as-fast-as-c-working-at-a-high-altitude-for-low-level-performance/ http://donsbot.wordpress.com/2008/06/04/haskell-as-fast-as-c...