On Sun, Oct 28, 2007 at 01:25:19PM -0700, Don Stewart wrote:
Finally, we can manually translate the C code into a confusing set of nested
loops with interleaved IO,
main = loop 1
where
loop !i | i 1 = return ()
| otherwise = if i == go i 0 1 then
stefanor:
On Sun, Oct 28, 2007 at 01:25:19PM -0700, Don Stewart wrote:
Finally, we can manually translate the C code into a confusing set of nested
loops with interleaved IO,
main = loop 1
where
loop !i | i 1 = return ()
| otherwise = if i ==
On Sun, Oct 28, 2007 at 01:43:07PM -0700, Don Stewart wrote:
stefanor:
IO blocks unboxing in GHC. How fast is your mock-C code refactored to
do IO outside of the loops only?
It doesn't! The above code yields:
Main.$wloop :: GHC.Prim.Int#
- GHC.Prim.State#
On 10/28/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
On Sun, Oct 28, 2007 at 01:43:07PM -0700, Don Stewart wrote:
stefanor:
IO blocks unboxing in GHC. How fast is your mock-C code refactored to
do IO outside of the loops only?
It doesn't! The above code yields:
Main.$wloop ::
dons:
stefanor:
On Sun, Oct 28, 2007 at 01:25:19PM -0700, Don Stewart wrote:
Finally, we can manually translate the C code into a confusing set of
nested
loops with interleaved IO,
main = loop 1
where
loop !i | i 1 = return ()
|