File tree 3 files changed +9
-10
lines changed
3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
4
+ #### 2.0.2
5
+
6
+ Another performance bump.
7
+
8
+
4
9
#### 2.0.1
5
10
6
11
Major performance improvements.
Original file line number Diff line number Diff line change 3
3
"name" : " icidasset/elm-sha" ,
4
4
"summary" : " SHA cryptographic hash functions." ,
5
5
"license" : " MIT" ,
6
- "version" : " 2.0.1 " ,
6
+ "version" : " 2.0.2 " ,
7
7
"exposed-modules" : [
8
8
" SHA"
9
9
],
Original file line number Diff line number Diff line change @@ -48,24 +48,18 @@ combine : Int -> Bits -> Bits -> Bits
48
48
combine sizeInBits x y =
49
49
let
50
50
sum =
51
- Binary . dropLeadingZeros ( Binary . add x y)
51
+ Binary . add x y
52
52
53
53
width =
54
54
Binary . width sum
55
55
in
56
56
if width > sizeInBits then
57
- let
58
- excess =
59
- width - sizeInBits
60
- in
61
57
-- Is the sum larger than the modulo constant (ie. 2 ^ sizeInBits)?
62
58
sum
63
59
|> Binary . toBooleans
64
- |> List . drop excess
60
+ |> List . drop ( width - sizeInBits )
65
61
|> Binary . fromBooleans
66
- |> Binary . dropLeadingZeros
67
- |> Binary . ensureSize sizeInBits
68
62
69
63
else
70
64
-- If not, carry on.
71
- Binary . ensureSize sizeInBits sum
65
+ sum
You can’t perform that action at this time.
0 commit comments