#6121: Very poor constant folding -------------------------------------+-------------------------------------- Reporter: augustss | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Runtime performance bug | Testcase: Blockedby: | Blocking: Related: | -------------------------------------+-------------------------------------- GHC seems to lack constant folding for encodeFloat/decodeFloat. For many examples, compile the numeric-limits package on hackage, or just this snippet: {{{ epsilon :: Double epsilon = r where r = 1 - encodeFloat (m-1) e (m, e) = decodeFloat (1 `asTypeOf` r) }}} This has a very simple value, but GHC refuses to compute it at compile time. This in turn inhibits other constant folding that should be going on.
-- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6121> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs