
29 Apr
2014
29 Apr
'14
10:04 p.m.
On 30/04/14 02:16, John Lato wrote:
So this is interesting. The forLoop code gets compiled into a nice loop in core over unboxed Ints. The foldl' function OTOH still goes via a list. I expect it's not foldl' itself that's slow, rather that it doesn't fuse with the list producers in current GHCs. This may be improved in the future. Especially as the vectorized foldl' does fuse.
It bothers me especially as the comments around `enumFromTo` seem to explicitly talk about deforestation.