mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-15 08:14:21 +08:00
btrfs-progs: add SHA256 to hash-speedtest
Sample results, Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz Block size: 4096 Iterations: 1000000 NULL-NOP: cycles: 314296257, c/i 314 NULL-MEMCPY: cycles: 582807266, c/i 582 CRC32C: cycles: 1738544130, c/i 1738 XXHASH: cycles: 1449519934, c/i 1449 SHA256: cycles: 110648340548, c/i 110648 Note this is unoptimized reference implementation. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2047b6de3d
commit
f5e952b13d
@ -1,6 +1,7 @@
|
||||
#include "../kerncompat.h"
|
||||
#include "crypto/hash.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "crypto/sha.h"
|
||||
|
||||
#ifndef __x86_64__
|
||||
#error "Only x86_64 supported"
|
||||
@ -60,6 +61,7 @@ int main(int argc, char **argv) {
|
||||
{ .name = "NULL-MEMCPY", .digest = hash_null_memcpy, .digest_size = 32 },
|
||||
{ .name = "CRC32C", .digest = hash_crc32c, .digest_size = 4 },
|
||||
{ .name = "XXHASH", .digest = hash_xxhash, .digest_size = 8 },
|
||||
{ .name = "SHA256", .digest = hash_sha256, .digest_size = 32 },
|
||||
};
|
||||
|
||||
if (argc > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user