
27 Apr
2014
27 Apr
'14
4:10 p.m.
On 27/04/14 03:28, John Lato wrote:
No, I mean this:
V.forM_ (V.enumFromN 1 n)
Hey John, unfortunately that's not fast, and it eats all the RAMs. Here comes the sad comparison of looping in Haskell: - loop (maxBound :: Word32) 3 seconds, constant space - forM_ [0..maxBound :: Word32] 36 seconds, constant space - V.forM_ (V.enumFromTo 0 (maxBound :: Word32)) 37 seconds, constant space - V.forM_ (V.enumFromN 0 (fromIntegral (maxBound :: Word32))) linear space -> crashes All loops execute `return ()`. :(