You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a file with 1GB size. fallocate -l 1G bench.dat
And made 3 test program. Python with hashlib:
time python3 ./bench.py
49bc20df15e412a64472421e13fe86ff1c5165e18b2afccf160d4dc19fe68a14
real 0m2.699s
user 0m2.313s
sys 0m0.379s
C with openssl/sha.h:
time ./sha256 ../bench.dat
File('../bench.dat'): 49bc20df15e412a64472421e13fe86ff1c5165e18b2afccf160d4dc19fe68a14
real 0m2.476s
user 0m2.310s
sys 0m0.153s
And C with sha256_mb.h (isa-l_crypto):
time ./a.out ../bench.dat
49bc20df15e412a64472421e13fe86ff1c5165e18b2afccf160d4dc19fe68a14
real 0m3.357s
user 0m3.171s
sys 0m0.175s
And I was very surprised when saw that time of hashing with isa-l_crypto was bigger. What could be the problem?
@tsv1991, you are not using the best part of multi-buffer hashing; hashing multiple independent jobs at one time. Disregarding file I/O time, you might be able to do 10-12 hashes in the time a single buffer hashing can do one. By just doing summit() followed immediately by flush() you loose any advantage of doing more than one job at a time. You do have to have independent hash jobs around as there is no way to split up a single hash block into independently calculated chunks.
I created a file with 1GB size.
fallocate -l 1G bench.dat
And made 3 test program.
Python with hashlib:
C with openssl/sha.h:
And C with sha256_mb.h (isa-l_crypto):
And I was very surprised when saw that time of hashing with isa-l_crypto was bigger. What could be the problem?
I was looking at this code https://github.com/01org/isa-l_crypto/blob/master/sha256_mb/sha256_mb_test.c and #3
Also I try use this example and got same time of hashing:
The text was updated successfully, but these errors were encountered: