[MLton-commit] r6970
Vesa Karvonen
vesak at mlton.org
Sun Nov 2 05:33:42 PST 2008
Minor optimization to use << rather than pow.
----------------------------------------------------------------------
U mlton/trunk/mlton/ast/word-size.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/ast/word-size.fun
===================================================================
--- mlton/trunk/mlton/ast/word-size.fun 2008-11-02 12:32:47 UTC (rev 6969)
+++ mlton/trunk/mlton/ast/word-size.fun 2008-11-02 13:33:42 UTC (rev 6970)
@@ -89,7 +89,7 @@
if signed
then
let
- val pow = IntInf.pow (2, Bits.toInt (bits s) - 1)
+ val pow = IntInf.<< (1, Bits.toWord (bits s) - 0w1)
in
(~ pow, pow - 1)
end
More information about the MLton-commit
mailing list