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

Reply via email to