Faster conversion between Rational and Double/Float
The proposal for the new implementation of fromRational
and toRational
was discussed (very briefly) here. Supported by Simon Peyton Jones and (off list) Jason Dagit. No dissent.
The old implementation of toRational
and fromRational
for Double
and Float
was extremely slow. Exploiting the representation of the involved types allows an order of magnitude speedup. In particular a fast base-2 logarithm is needed, this has to be implemented in the integer-gmp resp. integer-simple packages, therefore three patches are needed, for base and each of the integer packages.
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.3 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries (other) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |