[Haskell-cafe] Performance of functional priority queues
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
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe