[racket-dev] [plt] Push #28633: master branch updated
On 04/27/2014 05:14 PM, mflatt at racket-lang.org wrote:
>
> ~~~~~~~~~~
>
> d682c94 Matthew Flatt <mflatt at racket-lang.org> 2014-04-27 13:58
> :
> | repairs to precision of `exact->inexact` et al.
> |
> | Thanks to Neil T.!
> :
> M racket/src/racket/src/numarith.c | 28 ++++++--
> M racket/src/racket/src/ratfloat.inc | 74 +++++++++++++++-----
> M racket/src/racket/src/rational.c | 11 +++
> M racket/src/racket/src/schpriv.h | 2 +
> M .../racket-test/tests/racket/number.rktl | 53 ++++++++++++++
>
> ~~~~~~~~~~
>
> 04c4538 Matthew Flatt <mflatt at racket-lang.org> 2014-04-27 15:17
> :
> | speed up `inexact->exact`
> |
> | Parse IEEE floating-point numbers directly.
> |
> | Thanks to Neil T.!
> :
> M racket/src/racket/sconfig.h | 3 +
> M racket/src/racket/src/numstr.c | 177 ++++++++++++-------
> M racket/src/racket/src/ratfloat.inc | 73 +++++++-
> M racket/src/racket/src/rational.c | 18 +-
> M racket/src/racket/src/schpriv.h | 2 +
> M .../racket-test/tests/racket/number.rktl | 33 +++-
Thanks for translating these into C so quickly! My plane-line
intersection test cases run about twice as fast now, and because
`exact->inexact` is correctly rounded, I can set the error reporting
threshold to 0.5 ulps.
Strange thing, though: while `inexact->exact` is now about 10x faster,
my TR implementation `flonum->rational` is now about 7x slower. I've
verified that `flonum->fields` accounts for about 85% of the running
time. I see that you've changed `integer-bytes->integer`, which
`flonum->fields` uses. Could it have been a pessimization on certain
platforms?
Neil ⊥