On Mon, 18 Jul 2005, Bulat Ziganshin wrote:

> GHC also have a RULES pragma which can be used to automatically
> convert, for example, "mmap (*)" to "multipleElementWise".

Nice idea! But how can GHC decide which optimization is better?

  M.map sin . M.map cos

can be optimized to

  M.map (sin . cos)

or

  M.sin . M.cos

Which is better?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to