ldexp and frexp benchmark between Mir, C and Phobos
kinke
noone at nowhere.com
Sat Dec 29 12:35:03 UTC 2018
On Friday, 28 December 2018 at 19:48:28 UTC, 9il wrote:
> LDC, macos x64:
> ---------------------------
> ++++ float ++++
> ldexp (Phobos time / Mir time) = 2.55584
> ldexp ( stdc time / Mir time) = 0.773019
> frexp (Phobos time / Mir time) = 1.04093
> frexp ( stdc time / Mir time) = 1.748
> ---------------------------
> ++++ double ++++
> ldexp (Phobos time / Mir time) = 2.49162
> ldexp ( stdc time / Mir time) = 1.31868
> frexp (Phobos time / Mir time) = 0.937906
> frexp ( stdc time / Mir time) = 1.82241
> ---------------------------
> ++++ real ++++
> ldexp (Phobos time / Mir time) = 0.999327 (LDC Phobos uses C
> func for real)
> ldexp ( stdc time / Mir time) = 0.969467 (LDC Mir uses C func
> for real)
> frexp (Phobos time / Mir time) = 1.02512
> frexp ( stdc time / Mir time) = 1.77901
Any chance the multi-precision ldexp can be upstreamed to Phobos
(which currently uses real precision for the float/double
overloads, which explains the suboptimal performance)? It'd make
a *lot* more sense there, instead of having it in a separate
library. It's well-known that there's a lot of remaining std.math
functions which need proper single/double precision
implementations, and ldexp is one of them.
More information about the Digitalmars-d-announce
mailing list