[GHC] #2246: Numeric literal very badly optimized

GHC trac at galois.com
Mon Apr 28 16:07:48 EDT 2008


#2246: Numeric literal very badly optimized
-----------------------+----------------------------------------------------
    Reporter:  guest   |       Owner:          
        Type:  bug     |      Status:  new     
    Priority:  normal  |   Component:  Compiler
     Version:  6.9     |    Severity:  major   
    Keywords:          |    Testcase:          
Architecture:  x86     |          Os:  MacOS X 
-----------------------+----------------------------------------------------
 Compile the following program with -ddump-simpl

 {{{
 main = interact $ show . (< 1e40) . read
 }}}

 Note how there's no literal value 1e40::Double anywhere in the code.
 Instead there's a call to fromRat to do the conversion.

 Now replace 1e40 with (1e40::Double), and the code looks good.  So it
 seems that when defaulting is involved the code is '''much''' worse.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2246>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list