#2271: floor, ceiling, round :: Double -> Int are awesomely slow
------------------------------------------+---------------------------------
Reporter: dons | Owner: daniel.is.fischer
Type: bug | Status: patch
Priority: low | Milestone: 7.0.1
Component: libraries/base | Version: 7.1
Keywords: performance, math, double | Testcase:
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
------------------------------------------+---------------------------------
Comment(by simonpj):
> So the other obvious solution is to bring Double, Float and the
functions into scope in GHC.Int and GHC.Word.
That looks best, yes. It's best if a rule appears in the same module as
at least one thing on the LHS of the rule. And if you look at these
rules, they look like
{{{
truncate Float Int8 x = (fromIntegral :: Int -> Int8) (truncate
(x::Float))
}}}
and indeed `Int8` appears on the left.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2271#comment:31>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs