[Haskell-cafe] saner shootout programs

Don Stewart dons at galois.com
Sun May 11 17:26:28 EDT 2008


jhc0033:
> On Sun, May 11, 2008 at 1:40 PM, Don Stewart <dons at galois.com> wrote:
> 
> > n-body requires updating a global array of double values to be
> 
> I think the array and any side-effects on it can and should be local
> to the simulation procedure.
> 
> > competitive performance-wise, though we haven't really nailed this
> > benchmark yet. The current entry should be considered an older approach
> > to raw performance -- typically we can get good (or better) results in
> > using the ST monad.
> 
> As I understand, a function can use ST, but still be pure. If so,

Right, its identical to the current solution, but the mutability is
guaranteed not to escape the simulation scope.

-- Don


More information about the Haskell-Cafe mailing list