[Haskell-cafe] Question: Lazy Incremental Evaluation and Haskell?

David Barbour dmbarbour at gmail.com
Fri Oct 7 18:13:01 CEST 2011

On Fri, Oct 7, 2011 at 3:17 AM, Heinrich Apfelmus <apfelmus at quantentunnel.de
> wrote:

> FRP is somewhat orthogonal to incremental computation because FRP is
> focusing on expressiveness while incremental computation focuses on
> performance. You can formulate some incremental algorithms in terms of FRP,
> but you need special support from the implementation to make it efficient.

Granted. The 'Reactive' library provides some special support for composing
constant behavior values, but I share your doubts about its suitability for
high-performance incremental computation. By my understanding from Push-Pull
FRP, it should scale poorly in terms of linear 'checks' of promises when
trying to find which variables have changed. If you have 1000 variables you
still might need to probe up to 1000 promises (or more, if you use vars more
than once) to see their next time-of-change.

My asynchronous arrows and reactive demand programming model is well suited
for incremental computation, having been designed for scalability and
distributed computation (breaking it into multiple pipelines with minimal
synchronization interactions at zip and merge). But it currently lacks a
complete implementation.

> Even then, events and behaviors are "one abstraction level too low". In my
> opinion, you are better off with a library/approach geared directly towards
> incremental computations.

I believe behaviors are precisely the 'right' abstraction if the goal is to
model variables in a computation changing over time. But I agree that, if
the libraries aren't taking advantage of the implicit optimization
opportunities, you are better off finding libraries that do.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111007/89f8a13c/attachment.htm>

More information about the Haskell-Cafe mailing list