From 92e8bdaf1a082446b93b29a898423e7a65a8b8ae Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 6 May 2013 08:35:03 -0700 Subject: [PATCH] io.streams.random: slightly faster. --- extra/io/streams/random/random.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/io/streams/random/random.factor b/extra/io/streams/random/random.factor index dae22b88d9..2c3b083377 100644 --- a/extra/io/streams/random/random.factor +++ b/extra/io/streams/random/random.factor @@ -11,9 +11,9 @@ C: random-stream M: random-stream stream-element-type drop +byte+ ; M: random-stream stream-read-unsafe - drop [ dup random-bytes ] [ 0 swap copy ] bi* ; + drop [ dup random-bytes ] [ 0 swap copy-unsafe ] bi* ; -M: random-stream stream-read1 drop 256 random ; +M: random-stream stream-read1 drop 256 random-integer ; M: random-stream stream-read-partial-unsafe stream-read-unsafe ;