Re: ldexp and frexp benchmark between Mir, C and Phobos

2019-01-02 Thread Guillaume Piolat via Digitalmars-d-announce
On Wednesday, 2 January 2019 at 09:35:39 UTC, kinke wrote: On Tuesday, 1 January 2019 at 23:36:55 UTC, Guillaume Piolat wrote: llvm_exp (defers to C runtime) gives considerable speed improvement over `std.math.exp`. My tests back then on Linux also showed new `exp(float)` being about half as

Re: ldexp and frexp benchmark between Mir, C and Phobos

2019-01-02 Thread kinke via Digitalmars-d-announce
On Tuesday, 1 January 2019 at 23:36:55 UTC, Guillaume Piolat wrote: llvm_exp (defers to C runtime) gives considerable speed improvement over `std.math.exp`. My tests back then on Linux also showed new `exp(float)` being about half as fast as C, while the double-version was somehow 4x faster.

Re: ldexp and frexp benchmark between Mir, C and Phobos

2019-01-01 Thread Guillaume Piolat via Digitalmars-d-announce
On Monday, 31 December 2018 at 13:24:29 UTC, kinke wrote: On Sunday, 30 December 2018 at 13:39:44 UTC, Guillaume Piolat wrote: Been waiting for an exp() rewrite. And Boost-licensed! I'm using expf() from whatever libc is shipped and the variability of results and lack of control is annoying.

Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-31 Thread kinke via Digitalmars-d-announce
On Sunday, 30 December 2018 at 13:39:44 UTC, Guillaume Piolat wrote: Been waiting for an exp() rewrite. And Boost-licensed! I'm using expf() from whatever libc is shipped and the variability of results and lack of control is annoying. exp != {ld,fr}exp. Phobos includes a proper single/double

Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-30 Thread Guillaume Piolat via Digitalmars-d-announce
On Friday, 28 December 2018 at 19:48:28 UTC, 9il wrote: ldexp and frexp are base building blocks for a lot of math functions. Here is a small benchmark that compares Mir, C and Phobos implementations: Wow, thanks! Been waiting for an exp() rewrite. And Boost-licensed! I'm using expf()

Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread 9il via Digitalmars-d-announce
On Saturday, 29 December 2018 at 15:15:48 UTC, Iain Buclaw wrote: On Fri, 28 Dec 2018 at 20:50, 9il via Digitalmars-d-announce wrote: ldexp and frexp are base building blocks for a lot of math functions. Here is a small benchmark that compares Mir, C and Phobos implementations:

Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread Iain Buclaw via Digitalmars-d-announce
On Fri, 28 Dec 2018 at 20:50, 9il via Digitalmars-d-announce wrote: > > ldexp and frexp are base building blocks for a lot of math > functions. > > Here is a small benchmark that compares Mir, C and Phobos > implementations: > > https://github.com/libmir/mir-core/blob/master/bench_ldexp_frexp.d >

Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread 9il via Digitalmars-d-announce
On Saturday, 29 December 2018 at 12:35:03 UTC, kinke wrote: On Friday, 28 December 2018 at 19:48:28 UTC, 9il wrote: 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)?

Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread kinke via Digitalmars-d-announce
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