Library for efficient integer division by a single divider
When repeatedly dividing (with integer arithmetics) by the same divider, there are certain tricks that allow
for quicker operation that the CPU's divide command. This is payed for by higher computation work during the setup stage.
For compile time known values, the compiler already performs this trick. This module is meant for run-time known values
that are used repeatedly.
Library for efficient integer division by a single divider
When repeatedly dividing (with integer arithmetics) by the same divider, there are certain tricks that allow for quicker operation that the CPU's divide command. This is payed for by higher computation work during the setup stage.
For compile time known values, the compiler already performs this trick. This module is meant for run-time known values that are used repeatedly.
This code is a D adaptation of libdivide (http://libdivide.com).