divRem by `-' performance
Albert Y. C. Lai
trebla at vex.net
Thu Oct 18 22:44:22 CEST 2012
On 12-10-18 03:10 PM, Serge D. Mechveliani wrote:
> But in this example of qRem the time is almost so as if quot was
> not computed.
> Probably, the coefficient of this expense is small.
> On the other hand, an extra memory occupation also often causes slowing
> down of all the environment program, because this occupation approaches
> garbage collection.
Use "./Main +RTS -s -RTS" to find out how hard the garbage collector has
to work. Use "./Main +RTS -M64m -RTS" to find out how much memory is not
enough. We are speaking of "snd (qRem n 5)", of course.
("64MB ought to be enough for everybody."? :) )
More information about the Glasgow-haskell-users