using error x as a placeholder

Hal Daume III hdaume@ISI.EDU
Wed, 15 May 2002 09:35:43 -0700 (PDT)


In thinking about it I figured it may be because I was using Integer and
not Int; I recompiled without -fall-strict and with Int instead of
Integer.  In that case,

mkArray1: 27.27u 2.37s 0:32.32 91.7%
mkArray2: 25.88u 2.33s 0:30.97 91.0%

So here there's basically no difference in performance; the one with zeros
is just a bit faster than the other, but probably not significantly so.

So this case didn't show a problem with undefined.  Could there ever be a
problem or is the compiler smart enough to catch this?

 - Hal

--
Hal Daume III

 "Computer science is no more about computers    | hdaume@isi.edu
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume

On Wed, 15 May 2002, Simon Marlow wrote:

> [ moved to glasgow-haskell-users@haskell.org ]
> 
> > The timing results were:
> > 
> > mkArray1: 11.42u 0.79s 0:13.47 90.6%
> > mkArray2: 24.55u 2.31s 0:30.12 89.1%
> > 
> > Which is actually *slower*.  Any ideas why?  (These were 
> > compiled with ghc
> > 5.02.3 -O2 -fvia-c -fall-strict)
> 
> What are the results without -fall-strict?  (-fall-strict is an old
> experimental flag and almost certainly doesn't do anything reasonable.
> We've de-documented it in the HEAD).
> 
> Cheers,
> 	Simon
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>