On 8/19/07, Andrew Coppin <[EMAIL PROTECTED]> wrote: > Does GHC do stuff like converting (2*) into (shift 1) or converting x + > x into 2*x? >
Hmm, that's an interesting architecture where multiplication is cheaper than addition :-) > If I do x * sin 12, is GHC likely to compute sin 12 at compile-time? > I seriously doubt it, but there's an easy way to find out the answer to all these questions: pass the -ddump-simpl flag to GHC so that it prints out the intermediate code it generates. There's some information in the users' guide about how to read the results. Cheers, Tim -- Tim Chevalier * catamorphism.org * Often in error, never in doubt "I always wanted to be commander-in-chief of my own one-woman army" -- Ani DiFranco _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe