]> gitweb.factorcode.org Git - factor.git/blob - extra/benchmark/sha1/sha1.factor
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
[factor.git] / extra / benchmark / sha1 / sha1.factor
1 USING: checksums checksums.sha sequences byte-arrays kernel ;
2 IN: benchmark.sha1
3
4 : sha1-benchmark ( -- )
5     2000000 <iota> >byte-array sha1 checksum-bytes drop ;
6
7 : sha224-benchmark ( -- )
8     2000000 <iota> >byte-array sha-224 checksum-bytes drop ;
9
10 : sha256-benchmark ( -- )
11     2000000 <iota> >byte-array sha-256 checksum-bytes drop ;
12
13 USE: checksums.openssl
14
15 : openssl-sha1-benchmark ( -- )
16     2000000 <iota> >byte-array openssl-sha1 checksum-bytes drop ;
17
18 MAIN: sha1-benchmark