isa-l_crypto slower than openssl/sha for hashing sha256 #111
Labels
No labels
announcement
bug
duplicate
enhancement
help wanted
invalid
Next release
question
sighting
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-intel/isa-l_crypto#111
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I created a file with 1GB size.
fallocate -l 1G bench.datAnd 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 https://github.com/intel/isa-l_crypto/issues/3
Also I try use this example and got same time of hashing:
@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.
@gbtucker should the hash calculated using multi-buffer hashing and the classic approach be the same?
I couldn't get a hash to be the same.