Last active
August 29, 2015 14:18
Revisions
-
vasily-kirichenko revised this gist
Apr 17, 2015 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,10 +12,14 @@ let bench (input: byte[]) (digest: HashAlgorithm) = let input = Array.zeroCreate<byte> 10000000 [ new MD5CryptoServiceProvider() :> HashAlgorithm new SHA1CryptoServiceProvider() :> _ SHA256.Create() :> _ new SHA256CryptoServiceProvider() :> _ new SHA256Cng() :> _ SHA512.Create() :> _ new SHA512CryptoServiceProvider() :> _ new SHA512Cng() :> _ ] |> List.iter (bench input) -
vasily-kirichenko revised this gist
Apr 17, 2015 . 1 changed file with 11 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,15 +2,20 @@ open System.Security.Cryptography open System.Diagnostics open System let bench (input: byte[]) (digest: HashAlgorithm) = let sw = Stopwatch.StartNew() for _ in 1..100 do digest.ComputeHash input |> ignore // |> M.toHex |> printfn "%s" sw.Stop() printfn "%s elapled %O" (digest.GetType().Name) sw.Elapsed let input = Array.zeroCreate<byte> 10000000 [ new MD5CryptoServiceProvider() :> HashAlgorithm new SHA1CryptoServiceProvider() :> _ SHA256.Create() :> _ new SHA256CryptoServiceProvider() :> _ SHA512.Create() :> _ new SHA512CryptoServiceProvider() :> _ ] |> List.iter (bench input) -
vasily-kirichenko revised this gist
Apr 11, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,11 +3,11 @@ open System.Diagnostics open System let bench (digest: HashAlgorithm) (input: byte[]) = let sw = Stopwatch.StartNew() for _ in 1..100 do digest.ComputeHash input |> ignore sw.Stop() printfn "%s elapled %O" (digest.GetType().Name) sw.Elapsed let input = Array.zeroCreate<byte> 10000000 bench (MD5.Create()) input -
vasily-kirichenko revised this gist
Apr 11, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,4 @@ let input = Array.zeroCreate<byte> 10000000 bench (MD5.Create()) input bench (SHA1.Create()) input bench (SHA256.Create()) input bench (SHA512.Create()) input -
vasily-kirichenko revised this gist
Apr 11, 2015 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,13 +3,14 @@ open System.Diagnostics open System let bench (digest: HashAlgorithm) (input: byte[]) = let sw = Stopwatch.StartNew() for _ in 1..100 do digest.ComputeHash input |> ignore sw.Stop() printfn "%s elapled %O" (digest.GetType().Name) sw.Elapsed let input = Array.zeroCreate<byte> 10000000 bench (MD5.Create()) input bench (SHA1.Create()) input bench (SHA256.Create()) input bench (SHA512.Create()) input -
vasily-kirichenko revised this gist
Apr 11, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,4 @@ let bench (digest: HashAlgorithm) (input: byte[]) = let input = Array.zeroCreate<byte> 10000000 bench (MD5.Create()) input bench (SHA1.Create()) input bench (SHA256.Create()) input -
vasily-kirichenko created this gist
Apr 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ open System.Security.Cryptography open System.Diagnostics open System let bench (digest: HashAlgorithm) (input: byte[]) = let sw = Stopwatch.StartNew() for _ in 1..100 do digest.ComputeHash input |> ignore sw.Stop() printfn "%s elapled %O" (digest.GetType().Name) sw.Elapsed let input = Array.zeroCreate<byte> 10000000 bench (MD5.Create()) input bench (SHA1.Create()) input bench (SHA256Cng.Create()) input