[MLton-devel] improvement for Int.{div,mod}

Stephen Weeks MLton@mlton.org
Mon, 21 Jul 2003 16:48:41 -0700


Because of Franck Arnaud's question, I was looking into the x86
assembly for Int.{quot,rem}, which are used to implement
Int.{div,mod}.  I noticed a possible improvement -- since the basis
library code is testing whether the arguments are greater than zero,
there is no need for the codegen to have to retest, as it appears to.
We could either put some negations in the basis library code so that
quot and rem are always called with positives, or we could add quot
and rem primitives that know the sign of the arguments.

A minor point, but it could help.



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel