Tweak some benchmark parameters
parent
0f0218b209
commit
9dc7b4b95a
|
@ -5,7 +5,7 @@ IN: benchmark.base64
|
|||
|
||||
: base64-benchmark ( -- )
|
||||
65535 [ 255 bitand ] "" map-as
|
||||
100 [ >base64 base64> ] times
|
||||
20 [ >base64 base64> ] times
|
||||
drop ;
|
||||
|
||||
MAIN: base64-benchmark
|
||||
|
|
|
@ -8,7 +8,7 @@ IN: benchmark.beust1
|
|||
1 [a,b] [ number>string all-unique? ] count ; inline
|
||||
|
||||
: beust ( -- )
|
||||
10000000 count-numbers
|
||||
2000000 count-numbers
|
||||
number>string " unique numbers." append print ;
|
||||
|
||||
MAIN: beust
|
||||
|
|
|
@ -34,7 +34,7 @@ IN: benchmark.beust2
|
|||
|
||||
:: beust ( -- )
|
||||
[let | i! [ 0 ] |
|
||||
10000000000 [ i 1+ i! ] count-numbers
|
||||
5000000000 [ i 1+ i! ] count-numbers
|
||||
i number>string " unique numbers." append print
|
||||
] ;
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@ USING: math kernel alien ;
|
|||
] alien-callback
|
||||
"int" { "int" } "cdecl" alien-indirect ;
|
||||
|
||||
: fib-main ( -- ) 34 fib drop ;
|
||||
: fib-main ( -- ) 32 fib drop ;
|
||||
|
||||
MAIN: fib-main
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
USING: checksums checksums.md5 io.files kernel ;
|
||||
USING: checksums checksums.md5 sequences byte-arrays kernel ;
|
||||
IN: benchmark.md5
|
||||
|
||||
: md5-file ( -- )
|
||||
"vocab:mime/multipart/multipart-tests.factor" md5 checksum-file drop ;
|
||||
2000000 iota >byte-array md5 checksum-bytes drop ;
|
||||
|
||||
MAIN: md5-file
|
||||
|
|
|
@ -11,6 +11,6 @@ IN: benchmark.random
|
|||
] with-file-writer ;
|
||||
|
||||
: random-main ( -- )
|
||||
1000000 write-random-numbers ;
|
||||
300000 write-random-numbers ;
|
||||
|
||||
MAIN: random-main
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
USING: checksums checksums.sha1 io.files kernel ;
|
||||
USING: checksums checksums.sha1 sequences byte-arrays kernel ;
|
||||
IN: benchmark.sha1
|
||||
|
||||
: sha1-file ( -- )
|
||||
"vocab:mime/multipart/multipart-tests.factor" sha1 checksum-file drop ;
|
||||
2000000 iota >byte-array sha1 checksum-bytes drop ;
|
||||
|
||||
MAIN: sha1-file
|
||||
|
|
|
@ -9,6 +9,6 @@ IN: benchmark.sum-file
|
|||
ascii [ 0 sum-file-loop ] with-file-reader . ;
|
||||
|
||||
: sum-file-main ( -- )
|
||||
random-numbers-path sum-file ;
|
||||
5 [ random-numbers-path sum-file ] times ;
|
||||
|
||||
MAIN: sum-file-main
|
||||
|
|
Loading…
Reference in New Issue