Skip to content

Commit

Permalink
fy-tool: Add b3sum BLAKE3 interface
Browse files Browse the repository at this point in the history
We're going to use BLAKE3 internally quite a lot in the future,
so we're going to have a way to debug and verify its operation.

This commit introduces a --b3sum tool mode which is pretty
much a carbon copy of the official rust based b3sum tool.

$ b3sum AUTHORS
ef16663afb2548b2c155db790ed360f1fde46e777fb686d43c48454397094184  AUTHORS
$ fy-tool --b3sum AUTHORS
ef16663afb2548b2c155db790ed360f1fde46e777fb686d43c48454397094184  AUTHORS
$ b3sum AUTHORS | fy-tool --b3sum --check -
AUTHORS: OK

Highlights:

- About the same speed on memory cached file I/O or SDD media.
  Not surprising since 97% of time spend is on the assembly hashing
  functions, if the stealing thread pool implementation are similar.
- Much faster on HDD uncached file I/O (about 40%) due to
  rotational media detection and adjusting accordingly.
- In either case, file BLAKE3 hashing is I/O limited in all cases,
  on a reasonably recent machine.
- Backend selection via --backend switch
- List available backends with --list-backends
- Extensive options for controlling operation, use --b3sum --help

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
  • Loading branch information
pantoniou committed Sep 25, 2023
1 parent cdf3b5c commit 140e762
Showing 1 changed file with 442 additions and 17 deletions.
Loading

0 comments on commit 140e762

Please sign in to comment.