Re: Libdivide ported to D

2017-05-15 Thread Walter Bright via Digitalmars-d-announce
On 5/15/2017 3:51 AM, Jonathan M Davis via Digitalmars-d-announce wrote: Liran was telling me last year about how the folks at Weka had used this to speed up the stuff in core.time and std.datetime in their local branch and wanted me to look into updating the official implementation to use it (un

Re: Libdivide ported to D

2017-05-15 Thread Jonathan M Davis via Digitalmars-d-announce
On Sunday, May 14, 2017 16:20:21 David Nadlinger via Digitalmars-d-announce wrote: > On Sunday, 14 May 2017 at 15:30:19 UTC, Walter Bright wrote: > > On 5/14/2017 3:39 AM, Tomer Filiba wrote: > >> Of course it only applies to runtime division -- the compiler > >> can do the same if > >> the diviso

Re: Libdivide ported to D

2017-05-14 Thread David Nadlinger via Digitalmars-d-announce
On Sunday, 14 May 2017 at 15:30:19 UTC, Walter Bright wrote: On 5/14/2017 3:39 AM, Tomer Filiba wrote: Of course it only applies to runtime division -- the compiler can do the same if the divisor is known in compile time. I hate to say this, but modern compilers already do this for generated

Re: Libdivide ported to D

2017-05-14 Thread Walter Bright via Digitalmars-d-announce
On 5/14/2017 3:39 AM, Tomer Filiba wrote: https://code.dlang.org/packages/divide Libdivide (http://libdivide.com/) allows converting the DIV instruction (in runtime) to a series of shifts and MULs, which is much more efficient in execution time. It works by taking a number (the divisor or "denom

Libdivide ported to D

2017-05-14 Thread Tomer Filiba via Digitalmars-d-announce
https://code.dlang.org/packages/divide Libdivide (http://libdivide.com/) allows converting the DIV instruction (in runtime) to a series of shifts and MULs, which is much more efficient in execution time. It works by taking a number (the divisor or "denominator") and doing some preprocessing t