Tweak some benchmark parameters

db4
Slava Pestov 2009-04-17 17:55:01 -05:00
parent 0f0218b209
commit 9dc7b4b95a
8 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,7 @@ IN: benchmark.base64
: base64-benchmark ( -- ) : base64-benchmark ( -- )
65535 [ 255 bitand ] "" map-as 65535 [ 255 bitand ] "" map-as
100 [ >base64 base64> ] times 20 [ >base64 base64> ] times
drop ; drop ;
MAIN: base64-benchmark MAIN: base64-benchmark

View File

@ -8,7 +8,7 @@ IN: benchmark.beust1
1 [a,b] [ number>string all-unique? ] count ; inline 1 [a,b] [ number>string all-unique? ] count ; inline
: beust ( -- ) : beust ( -- )
10000000 count-numbers 2000000 count-numbers
number>string " unique numbers." append print ; number>string " unique numbers." append print ;
MAIN: beust MAIN: beust

View File

@ -34,7 +34,7 @@ IN: benchmark.beust2
:: beust ( -- ) :: beust ( -- )
[let | i! [ 0 ] | [let | i! [ 0 ] |
10000000000 [ i 1+ i! ] count-numbers 5000000000 [ i 1+ i! ] count-numbers
i number>string " unique numbers." append print i number>string " unique numbers." append print
] ; ] ;

View File

@ -9,6 +9,6 @@ USING: math kernel alien ;
] alien-callback ] alien-callback
"int" { "int" } "cdecl" alien-indirect ; "int" { "int" } "cdecl" alien-indirect ;
: fib-main ( -- ) 34 fib drop ; : fib-main ( -- ) 32 fib drop ;
MAIN: fib-main MAIN: fib-main

View File

@ -1,7 +1,7 @@
USING: checksums checksums.md5 io.files kernel ; USING: checksums checksums.md5 sequences byte-arrays kernel ;
IN: benchmark.md5 IN: benchmark.md5
: md5-file ( -- ) : md5-file ( -- )
"vocab:mime/multipart/multipart-tests.factor" md5 checksum-file drop ; 2000000 iota >byte-array md5 checksum-bytes drop ;
MAIN: md5-file MAIN: md5-file

View File

@ -11,6 +11,6 @@ IN: benchmark.random
] with-file-writer ; ] with-file-writer ;
: random-main ( -- ) : random-main ( -- )
1000000 write-random-numbers ; 300000 write-random-numbers ;
MAIN: random-main MAIN: random-main

View File

@ -1,7 +1,7 @@
USING: checksums checksums.sha1 io.files kernel ; USING: checksums checksums.sha1 sequences byte-arrays kernel ;
IN: benchmark.sha1 IN: benchmark.sha1
: sha1-file ( -- ) : sha1-file ( -- )
"vocab:mime/multipart/multipart-tests.factor" sha1 checksum-file drop ; 2000000 iota >byte-array sha1 checksum-bytes drop ;
MAIN: sha1-file MAIN: sha1-file

View File

@ -9,6 +9,6 @@ IN: benchmark.sum-file
ascii [ 0 sum-file-loop ] with-file-reader . ; ascii [ 0 sum-file-loop ] with-file-reader . ;
: sum-file-main ( -- ) : sum-file-main ( -- )
random-numbers-path sum-file ; 5 [ random-numbers-path sum-file ] times ;
MAIN: sum-file-main MAIN: sum-file-main