Skip to content

Commit b5b4789

Browse files
committed
Dropped sha256-slow from codebase
1 parent b59b06a commit b5b4789

File tree

3 files changed

+35
-219
lines changed

3 files changed

+35
-219
lines changed

src/standard/hash/sha256-slow.h

Lines changed: 0 additions & 184 deletions
This file was deleted.

tests/libs/date.b

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import date
22

3-
var total = 1000000
3+
var total = 10000
44
var start = time()
55

66
/* iter var i = 0; i < total; i++ {

tests/libs/hash.b

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,120 +2,120 @@ import hash
22

33
var start = time()
44

5-
for i in 1..1000001 {
5+
for i in 1..101 {
66
hash.adler32('hello, world')
77
}
88

9-
echo '1 million adler32 in ${time() - start}s'
9+
echo '1 hundred adler32 in ${time() - start}s'
1010
start = time()
1111

12-
for i in 1..1000001 {
12+
for i in 1..101 {
1313
hash.crc32('hello, world')
1414
}
1515

16-
echo '1 million crc32 in ${time() - start}s'
16+
echo '1 hundred crc32 in ${time() - start}s'
1717
start = time()
1818

19-
for i in 1..1000001 {
19+
for i in 1..101 {
2020
hash.md2('hello, world')
2121
}
2222

23-
echo '1 million md2 in ${time() - start}s'
23+
echo '1 hundred md2 in ${time() - start}s'
2424
start = time()
2525

26-
for i in 1..1000001 {
26+
for i in 1..101 {
2727
hash.md4('hello, world')
2828
}
2929

30-
echo '1 million md4 in ${time() - start}s'
30+
echo '1 hundred md4 in ${time() - start}s'
3131
start = time()
3232

33-
for i in 1..1000001 {
33+
for i in 1..101 {
3434
hash.md5('hello, world')
3535
}
3636

37-
echo '1 million md5 in ${time() - start}s'
37+
echo '1 hundred md5 in ${time() - start}s'
3838
start = time()
3939

40-
for i in 1..1000001 {
40+
for i in 1..101 {
4141
hash.sha1('hello, world')
4242
}
4343

44-
echo '1 million sha1 in ${time() - start}s'
44+
echo '1 hundred sha1 in ${time() - start}s'
4545
start = time()
4646

47-
for i in 1..1000001 {
47+
for i in 1..101 {
4848
hash.sha224('hello, world')
4949
}
5050

51-
echo '1 million sha224 in ${time() - start}s'
51+
echo '1 hundred sha224 in ${time() - start}s'
5252
start = time()
5353

54-
for i in 1..1000001 {
54+
for i in 1..101 {
5555
hash.sha256('hello, world')
5656
}
5757

58-
echo '1 million sha256 in ${time() - start}s'
58+
echo '1 hundred sha256 in ${time() - start}s'
5959
start = time()
6060

61-
for i in 1..1000001 {
61+
for i in 1..101 {
6262
hash.sha384('hello, world')
6363
}
6464

65-
echo '1 million sha384 in ${time() - start}s'
65+
echo '1 hundred sha384 in ${time() - start}s'
6666
start = time()
6767

68-
for i in 1..1000001 {
68+
for i in 1..101 {
6969
hash.sha512('hello, world')
7070
}
7171

72-
echo '1 million sha512 in ${time() - start}s'
72+
echo '1 hundred sha512 in ${time() - start}s'
7373
start = time()
7474

75-
for i in 1..1000001 {
75+
for i in 1..101 {
7676
hash.fnv1a('hello, world')
7777
}
7878

79-
echo '1 million fnv1a in ${time() - start}s'
79+
echo '1 hundred fnv1a in ${time() - start}s'
8080
start = time()
8181

82-
for i in 1..1000001 {
82+
for i in 1..101 {
8383
hash.fnv1a_64('hello, world')
8484
}
8585

86-
echo '1 million fnv1a_64 in ${time() - start}s'
86+
echo '1 hundred fnv1a_64 in ${time() - start}s'
8787
start = time()
8888

89-
for i in 1..1000001 {
89+
for i in 1..101 {
9090
hash.whirlpool('hello, world')
9191
}
9292

93-
echo '1 million whirlpool in ${time() - start}s'
93+
echo '1 hundred whirlpool in ${time() - start}s'
9494
start = time()
9595

96-
for i in 1..1000001 {
96+
for i in 1..101 {
9797
hash.snefru('hello, world')
9898
}
9999

100-
echo '1 million snefru in ${time() - start}s'
100+
echo '1 hundred snefru in ${time() - start}s'
101101
start = time()
102102

103-
for i in 1..1000001 {
103+
for i in 1..101 {
104104
hash.gost('hello, world')
105105
}
106106

107-
echo '1 million gost in ${time() - start}s'
107+
echo '1 hundred gost in ${time() - start}s'
108108
start = time()
109109

110-
for i in 1..1000001 {
110+
for i in 1..101 {
111111
hash.siphash('0123456789ABCDEF', 'hello, world')
112112
}
113113

114-
echo '1 million siphash in ${time() - start}s'
114+
echo '1 hundred siphash in ${time() - start}s'
115115
start = time()
116116

117-
for i in 1..1000001 {
117+
for i in 1..101 {
118118
hash.hmac_sha256('0123456789ABCDEF', 'hello, world')
119119
}
120120

121-
echo '1 million hmac_sha256 in ${time() - start}s'
121+
echo '1 hundred hmac_sha256 in ${time() - start}s'

0 commit comments

Comments
 (0)