[GHC] #4344: Better toRational for Float and Double
GHC
cvs-ghc at haskell.org
Mon Sep 27 06:30:59 EDT 2010
#4344: Better toRational for Float and Double
----------------------------------------+-----------------------------------
Reporter: daniel.is.fischer | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.12.3
Keywords: toRational, performance | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Runtime performance bug
----------------------------------------+-----------------------------------
Comment(by daniel.is.fischer):
Well, I would replace the body of `toRational` in the `Real` instances of
`Float` and `Double` with more or less the body of `toRat3`.
The bang on `d` makes no difference with optimisations and little
difference without, so that'll go. If testing also for `e == 0` makes a
difference at all, it's minuscule (less than 1%), so I'd leave that out.
I would like to test whether something can be gained by determining the
number of trailing 0-bits of `m` to avoid all `gcd`s before I propose a
specific patch.
Since GHC.Float is GHC-internal and maintainer is cvs-ghc and not
libraries, should the proposal go through the process nevertheless or
would I just attach the patch here and you validate and push directly?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4344#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list