[Bug 1998648] Re: Cat hash.sha256 | rhash -c - is 120x slower

Charles Evans 1998648 at bugs.launchpad.net
Tue Dec 13 10:50:22 UTC 2022


Given a 256 bit hash, 
Rhash -c should check sha256 first,
As it is the most common.
On a newer CPU it is done in hardware and is very fast. 
After identifying one successful hash match, 
Rhash should assume that the next hash to check is of the same type as the last successful one, and try that type first. 

Typical speedup of 
rhash -c -
Would be 120x

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rhash in Ubuntu.
https://bugs.launchpad.net/bugs/1998648

Title:
  Cat hash.sha256 | rhash -c - is 120x slower

Status in rhash package in Ubuntu:
  Opinion

Bug description:
  Time rhash -c hash.sha256
  3s
  Time Cat hash.sha256 | rhash -c - 
  5m55s
  CPU is pegged at 100% the whole time
  Use case:
  grep iso hash.sha256 | rhash -c -
  Also fails: 
  Time rhash -c <(  grep iso hash.sha256 )
  5m55s
  Sha256sum works, identical 17s times for all 4

  Ubuntu studio jammy LTS
  rhash 1.4.2-1ubuntu1
  rhash -V
  RHash v1.4.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rhash/+bug/1998648/+subscriptions




More information about the foundations-bugs mailing list