X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Finteger-tran.lisp;h=5bf070530bdf3180e42af86bfc6d452389301834;hb=4ba392170e98744f0ef0b8e08a5d42b988f1d0c9;hp=0331dfd05f1a6c8dfcf41118d141e3425d0b34a5;hpb=0a7604d54581d2c846838c26ce6a7993629586fa;p=sbcl.git diff --git a/src/compiler/integer-tran.lisp b/src/compiler/integer-tran.lisp index 0331dfd..5bf0705 100644 --- a/src/compiler/integer-tran.lisp +++ b/src/compiler/integer-tran.lisp @@ -15,8 +15,8 @@ ;;;; RANDOM in various integer cases (deftransform random ((limit &optional state) - ((integer 1 #.(expt 2 n-random-chunk-bits)) &optional *)) - "optimize to single-RANDOM-CHUNK operations" + ((integer 1 #.(ash 1 sb!vm:n-word-bits)) &optional *)) + "transform to a sample no wider than CPU word" (let ((type (lvar-type limit))) (if (numeric-type-p type) (let ((limit-high (numeric-type-high (lvar-type limit)))) @@ -35,7 +35,7 @@ (deftransform %inclusive-random-integer ((inclusive-limit state) (* *) * :policy (> speed space)) ;; By the way, some natural special cases (notably when the user is - ;; asking for a full RANDOM-CHUNK) could be expanded to much simpler + ;; asking for a full %RANDOM-WORD) could be expanded to much simpler ;; code (with no test and loop) if someone finds it important. '(let ((n-bits (integer-length inclusive-limit))) (%inclusive-random-integer-accept-reject (%random-bits n-bits state)