]> gitweb.factorcode.org Git - factor.git/commitdiff
make cmwc only 32 bits wide. oops, this speeds up everything
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 16 Oct 2009 20:19:30 +0000 (15:19 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 16 Oct 2009 20:19:30 +0000 (15:19 -0500)
extra/random/cmwc/cmwc.factor

index b38dd0a28a57ecc7c0f1456120e734b10374ea02..6b5b8caee26dd34ea886d68a32c187cdfa87505a 100644 (file)
@@ -43,10 +43,10 @@ M:: cmwc random-32* ( cmwc -- n )
 
     t -32 shift cmwc (>>c)
 
-    t cmwc [ b>> bitand ] [ c>> + ] bi 64 bits t!
+    t cmwc [ b>> bitand ] [ c>> + ] bi 32 bits t!
     t cmwc r>> > [
         cmwc [ 1 + ] change-c drop
-        t cmwc b>> - 64 bits t!
+        t cmwc b>> - 32 bits t!
     ] when
 
     cmwc [ r>> t - 32 bits dup ] [ i>> ] [ Q>> ] tri set-nth ;