[EMAIL PROTECTED] (S.D.Mechveliani) writes:
> Running the programs compiled with ghc-4 (several examples), i have
> noticed that it pretends to spend thousands of space less than
> ghc-3.02. Typically,
>
> ghc-3.02 with +RTS -H100k -K9k runs as fast as
> ghc-4 with +RTS -K4
>
> According to 4-00-notes.vsgml, the latter -K4 means that the task
> is performed within 4 bytes of heap+stack space.
Well, actually the 4 bytes will be rounded up to the nearest "block
size", ie. 4k.
> This might happen, maybe, for sum [1..1000], but for the real
> examples, it is somehow suspicious.
> Could anybody tell, what does -K4 mean in time ./run +RTS -K4
> in ghc-4?
> The whole test was to see, how the small space slows down the
> performance. And it appears it does not value any :-)
The maximum stack size shouldn't affect performance at all. The
*minimum* stack size (i.e. the -k RTS option) will affect performance,
as setting it too small will mean the stack may have to be copied
several times.
Cheers,
Simon
--
Simon Marlow [EMAIL PROTECTED]
University of Glasgow http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key