Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split test=Speed into SpeedBulk and SpeedSmall and report weighted average for Small key speed test #293

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 30, 2024

  1. Split Speed into SpeedBulk and SpeedSmall, add ENV{SMHASHER_SMALLKEY_…

    …MAX}
    
    It adds SMHASHER_SMALLKEY_MAX environment variable to override default
    value of the longest "Small key" for hash and changes default value from
    31 to 32 to make the Average a bit more fair to the hashes reading the
    memory word-by-word (dword, qword) and not byte-by-byte.
    
    SMHASHER_SMALLKEY_MIN is also added as a counterpart to benchmark hashes
    when the range of small key lengths is known.
    darkk committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    0c6a1ef View commit details
    Browse the repository at this point in the history
  2. Add weighted average to SpeedSmall test output

    It addresses the question at rurban#113
    
    What is the "real" average cycles/hash value for a given hash function?
    
    We can't know, but we can estimate it better if we assume that the
    function timing does not depend on input (that's not true for hashes
    based on multiplication) and we know distribution of key length in
    advance (that might be somewhat known for certain classes of inputs,
    but the distribution varies across classes measurably).
    darkk committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    2ee5761 View commit details
    Browse the repository at this point in the history