[MLton] IntInf implementation questions
Matthew Fluet
fluet@cs.cornell.edu
Sat, 4 Feb 2006 17:58:34 -0500 (EST)
I have a few questions/suggestions for the IntInf implemenation:
1) Why does the fill function in IntInf.c require space for 2 limbs,
rather than just space for 1 limb? It seems that we only use one
limb.
2) Is there a reason that IntInf_{quot,rem} have such complicated
implementations, rather than simply using mpz_tdiv_{q,r}? Those GMP
functions appear to have the right semantics.
3) Why does the bigMul function in int-inf.sml make use of an _import-ed
multiplication function for small multiplication? Wouldn't it be more
efficient to perform the multiplication with Int.* and handle the
overflow? Even on the C-codegen, overflow checking primitives are
inlined, and with the x86-codegen I see a considerable speed up on an
IntInf.int factorial benchmark that is dominated by small
multiplications.