[Haskell-cafe] Optimizing unamb by determining the "state" of a
bugfact at gmail.com
Mon Apr 20 03:41:17 EDT 2009
I was wandering if it would be possible to optimize
checking if a value is already evaluated to head normal form.
f `unamb` g
would then be extremely fast if either f or g is already evaluated to head
Maybe using some vacuum tricks?
This function would need to be in IO since it is of course not referentially
Although threads are lightweight in Haskell, forking/waiting/killing surely
must have more overhead than just checking the thunk of an expression?
Of course one could also make unamb a primitive :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe