Skip to content

Latest commit

 

History

History
116 lines (105 loc) · 11.5 KB

BENCHMARK.md

File metadata and controls

116 lines (105 loc) · 11.5 KB

Benchmarks

Libraries:

With 5MB message (10 iterations):

Algorithms hashlib PointyCastle crypto hash
MD4 1.59 Gbps 836 Mbps
1.9x slow
MD5 1.42 Gbps 728 Mbps
1.95x slow
1.15 Gbps
1.23x slow
617 Mbps
2.3x slow
HMAC(MD5) 1.37 Gbps 1.13 Gbps
1.21x slow
615 Mbps
2.23x slow
SHA-1 1.25 Gbps 439 Mbps
2.84x slow
861 Mbps
1.45x slow
351 Mbps
3.55x slow
HMAC(SHA-1) 1.25 Gbps 858 Mbps
1.46x slow
SHA-224 823 Mbps 179 Mbps
4.59x slow
744 Mbps
1.11x slow
172 Mbps
4.78x slow
SHA-256 827 Mbps 181 Mbps
4.57x slow
746 Mbps
1.11x slow
172 Mbps
4.79x slow
HMAC(SHA-256) 819 Mbps 740 Mbps
1.11x slow
SHA-384 1.32 Gbps 46.07 Mbps
28.59x slow
445 Mbps
2.96x slow
151 Mbps
8.74x slow
SHA-512 1.32 Gbps 44.17 Mbps
29.77x slow
443 Mbps
2.97x slow
150 Mbps
8.74x slow
SHA3-224 823 Mbps 27.88 Mbps
29.52x slow
SHA3-256 826 Mbps 26.6 Mbps
31.06x slow
SHA3-384 1.31 Gbps 20.37 Mbps
64.17x slow
SHA3-512 1.31 Gbps 13.97 Mbps
93.79x slow
RIPEMD-128 1.77 Gbps 378 Mbps
4.69x slow
RIPEMD-160 559 Mbps 239 Mbps
2.34x slow
281 Mbps
1.99x slow
RIPEMD-256 1.91 Gbps 373 Mbps
5.11x slow
RIPEMD-320 543 Mbps 237 Mbps
2.29x slow
BLAKE-2s 1.2 Gbps
BLAKE-2b 1.38 Gbps 105 Mbps
13.12x slow
Poly1305 2.2 Gbps 1.24 Gbps
1.77x slow
XXH32 3.84 Gbps
XXH64 2.63 Gbps
XXH3 987 Mbps
XXH128 985 Mbps
SM3 637 Mbps 185 Mbps
3.44x slow

With 1KB message (5000 iterations):

Algorithms hashlib PointyCastle crypto hash
MD4 1.51 Gbps 795 Mbps
1.9x slow
MD5 1.34 Gbps 684 Mbps
1.96x slow
1.08 Gbps
1.24x slow
804 Mbps
1.67x slow
HMAC(MD5) 1.01 Gbps 886 Mbps
1.14x slow
608 Mbps
1.66x slow
SHA-1 1.16 Gbps 416 Mbps
2.79x slow
809 Mbps
1.44x slow
395 Mbps
2.93x slow
HMAC(SHA-1) 773 Mbps 578 Mbps
1.34x slow
SHA-224 763 Mbps 170 Mbps
4.49x slow
694 Mbps
1.1x slow
174 Mbps
4.39x slow
SHA-256 763 Mbps 170 Mbps
4.49x slow
692 Mbps
1.1x slow
174 Mbps
4.38x slow
HMAC(SHA-256) 519 Mbps 500 Mbps
1.04x slow
SHA-384 1.14 Gbps 40.79 Mbps
27.98x slow
391 Mbps
2.92x slow
165 Mbps
6.92x slow
SHA-512 1.14 Gbps 40.88 Mbps
27.87x slow
391 Mbps
2.92x slow
166 Mbps
6.87x slow
SHA3-224 767 Mbps 25.06 Mbps
30.59x slow
SHA3-256 767 Mbps 25.03 Mbps
30.66x slow
SHA3-384 1.14 Gbps 20.05 Mbps
56.82x slow
SHA3-512 1.14 Gbps 13.41 Mbps
85.04x slow
RIPEMD-128 1.63 Gbps 359 Mbps
4.56x slow
RIPEMD-160 535 Mbps 229 Mbps
2.34x slow
286 Mbps
1.87x slow
RIPEMD-256 1.77 Gbps 356 Mbps
4.96x slow
RIPEMD-320 509 Mbps 224 Mbps
2.28x slow
BLAKE-2s 1.18 Gbps
BLAKE-2b 1.34 Gbps 104 Mbps
12.91x slow
Poly1305 2.12 Gbps 1.23 Gbps
1.72x slow
XXH32 4.12 Gbps
XXH64 2.54 Gbps
XXH3 918 Mbps
XXH128 925 Mbps
SM3 599 Mbps 174 Mbps
3.43x slow

With 10B message (100000 iterations):

Algorithms hashlib PointyCastle crypto hash
MD4 261 Mbps 138 Mbps
1.89x slow
MD5 242 Mbps 118 Mbps
2.05x slow
125 Mbps
1.94x slow
66.64 Mbps
3.63x slow
HMAC(MD5) 35.22 Mbps 38.21 Mbps
1.08x fast
17.63 Mbps
2x slow
SHA-1 152 Mbps 64.91 Mbps
2.34x slow
97.82 Mbps
1.55x slow
42.4 Mbps
3.58x slow
HMAC(SHA-1) 19.18 Mbps 17.66 Mbps
1.09x slow
SHA-224 107 Mbps 27.04 Mbps
3.97x slow
81.07 Mbps
1.32x slow
22.87 Mbps
4.7x slow
SHA-256 107 Mbps 26.91 Mbps
3.98x slow
82.72 Mbps
1.3x slow
23.14 Mbps
4.63x slow
HMAC(SHA-256) 13.54 Mbps 14.94 Mbps
1.1x fast
SHA-384 81.51 Mbps 3.49 Mbps
23.36x slow
29.83 Mbps
2.73x slow
11.84 Mbps
6.89x slow
SHA-512 81 Mbps 3.52 Mbps
23.02x slow
29.68 Mbps
2.73x slow
11.94 Mbps
6.78x slow
SHA3-224 107 Mbps 1.9 Mbps
56.53x slow
SHA3-256 107 Mbps 1.9 Mbps
56.4x slow
SHA3-384 80.78 Mbps 1.9 Mbps
42.47x slow
SHA3-512 81.33 Mbps 1.9 Mbps
42.87x slow
RIPEMD-128 233 Mbps 60.55 Mbps
3.85x slow
RIPEMD-160 80.32 Mbps 36.69 Mbps
2.19x slow
34.53 Mbps
2.33x slow
RIPEMD-256 238 Mbps 58.04 Mbps
4.1x slow
RIPEMD-320 76.66 Mbps 34.48 Mbps
2.22x slow
BLAKE-2s 168 Mbps
BLAKE-2b 140 Mbps 7.71 Mbps
18.21x slow
Poly1305 572 Mbps 308 Mbps
1.86x slow
XXH32 840 Mbps
XXH64 656 Mbps
XXH3 82.46 Mbps
XXH128 83.76 Mbps
SM3 101 Mbps 28.19 Mbps
3.57x slow

Key derivator algorithm benchmarks on different security parameters:

Algorithms little moderate good strong
scrypt 1.589 ms 16.688 ms 91.663 ms 2937.545 ms
bcrypt 2.24 ms 17.077 ms 273.729 ms 2155.139 ms
pbkdf2 0.849 ms 17.091 ms 283.537 ms 3419.39 ms
argon2i 3.914 ms 16.474 ms 215.783 ms 2598.387 ms
argon2d 2.981 ms 16.98 ms 207.425 ms 2563.844 ms
argon2id 2.311 ms 16.491 ms 205.25 ms 2576.335 ms

All benchmarks are done on AMD Ryzen 7 5800X processor and 3200MHz RAM using compiled exe

Dart SDK version: 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "windows_x64"