It would be good to do a comparison between this and GCC/GMP's division and modulo function.
Best way to run a test would be to pick a list of 128, 256, 512, 1024, 2048, 4096 and 8192 bit integers divided by 32, 64, 128 and 256 bit integers, pick 16~256 pairs for each set.
Hmm. libdivide isn't a bignum library - it doesn't support division above 64 bits! I think libdivide and GMP have different uses - GMP is for bignum arithmetic while libdivide is for repeated division.
It would be good to do a comparison between this and GCC/GMP's division and modulo function. Best way to run a test would be to pick a list of 128, 256, 512, 1024, 2048, 4096 and 8192 bit integers divided by 32, 64, 128 and 256 bit integers, pick 16~256 pairs for each set.