[Haskell-cafe] ANNOUNCE: StrictBench 0.1 - Benchmarking code through strict evaluation

Martijn van Steenbergen martijn at van.steenbergen.nl
Mon Jun 8 08:56:25 EDT 2009


Magnus Therning wrote:
> Is there no way to force repeated evaluation of a pure value?  (It'd
> be nice to be able to perform time measurements on pure code so that
> it's possible to compare Haskell implementations of algorithms to
> implementations in other languages, without running into confounding
> factors.)

I'm really curious about this too.

My guess is that the answer is "no" because doing so would (among other 
things) mean a thunk have to be copied first before it is evaluated, to 
preserve the unevaluated version. And what guarantee is there that 
values further down the expression haven't been evaluated already? 
Efficient lazy evaluation is hard; inefficient lazy evalation is even 
harder. ;-)

Martijn.


More information about the Haskell-Cafe mailing list