Libdivide ported to D

David Nadlinger via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun May 14 09:20:21 PDT 2017


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 runtime code when dividing by a constant. […]

As Tomer points out, a runtime implementation can still be useful 
if the divisor is only known dynamically (but constant across 
number of operations).

  — David


More information about the Digitalmars-d-announce mailing list