remove yet another slow mutable local

db4
Doug Coleman 2009-10-16 15:53:45 -05:00
parent 748631ab35
commit 741f19ab2f
1 changed files with 6 additions and 6 deletions

View File

@ -39,17 +39,17 @@ M:: cmwc random-32* ( cmwc -- n )
cmwc dup mod>> '[ 1 + _ bitand ] change-i cmwc dup mod>> '[ 1 + _ bitand ] change-i
[ a>> ] [ a>> ]
[ [ i>> ] [ Q>> ] bi nth-unsafe * ] [ [ i>> ] [ Q>> ] bi nth-unsafe * ]
[ c>> + ] tri :> t! [ c>> + ] tri
t -32 shift cmwc (>>c) [ -32 shift cmwc (>>c) ]
t cmwc [ b>> bitand ] [ c>> + ] bi 32 bits t! [ cmwc [ b>> bitand ] [ c>> + ] bi 32 bits ] bi
t cmwc r>> > [ dup cmwc r>> > [
cmwc [ 1 + ] change-c drop cmwc [ 1 + ] change-c drop
t cmwc b>> - 32 bits t! cmwc b>> - 32 bits
] when ] when
cmwc [ r>> t - 32 bits dup ] [ i>> ] [ Q>> ] tri set-nth-unsafe ; cmwc swap '[ r>> _ - 32 bits dup ] [ i>> ] [ Q>> ] tri set-nth-unsafe ;
: cmwc-4096 ( -- cmwc ) : cmwc-4096 ( -- cmwc )
4096 4096