[Haskell-cafe] Performance of functional priority queues
Gautam bt
gautam.bt at gmail.com
Mon Dec 28 13:04:32 EST 2009
On Tue, Dec 29, 2009 at 12:04 AM, Jon Harrop <jon at ffconsultancy.com> wrote:
>
> Forcing the evaluating of a thunk replaces the unevaluated expression with
> the
> value it evaluates to. That is effectively in-place mutation.
>
How can one use that to gain on efficiency? I understand that laziness
allows a modified data structure to share nodes with the original data
structure preventing unnecessary copying, but I do not see how forcing an
evaluation can be used to gain on efficiency (or alternatively prevent
inefficiency). Is there any simple example to illustrate this (or should I
read Okasaki)?
--
Thanks,
Gautam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091228/ccaa22eb/attachment.html
More information about the Haskell-Cafe
mailing list