[GHC] #1434: Slow conversion from Double to Int

GHC trac at galois.com
Wed Mar 17 14:36:28 EDT 2010


#1434: Slow conversion from Double to Int
------------------------------------------+---------------------------------
    Reporter:  ghc@…                      |        Owner:                         
        Type:  task                       |       Status:  new                    
    Priority:  normal                     |    Milestone:  6.12 branch            
   Component:  libraries/base             |      Version:  6.4.1                  
    Keywords:  rules                      |   Difficulty:  Unknown                
          Os:  Unknown/Multiple           |     Testcase:                         
Architecture:  Unknown/Multiple           |      Failure:  Runtime performance bug
------------------------------------------+---------------------------------

Comment(by isaacdupree):

 Does this RULE work on 32-bit, where Int is not as big as Int64? (I'm
 dubious)

 "truncate/Double->Int64"
     truncate = fromIntegral . double2Int :: Double -> Int64

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


More information about the Glasgow-haskell-bugs mailing list