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

ustring hash collision instrumentation #2786

Merged
merged 1 commit into from
Dec 25, 2020

Commits on Dec 14, 2020

  1. ustring hash collision instrumentation

    OSL has some concerns about how ustring hash collisions could impact
    its strategy for strings on GPU.
    
    This patch adds some instrumentation to ustring to detect hash
    collisions.  Added static ustring methods total_ustrings() and
    hash_collisions(). The latter tells you the number of collision pairs,
    including optionally enumerating them into a vector of ustrings. Also,
    `getstats(verbose=true)`, in Debug builds only, will print all of the
    colliding pairs.  These are both somewhat expensive if there are lots
    of strings (my laptop takes about 4 seconds to find and print all
    collisions for 10M ustrings). So if you are concerned about
    performance in debug builds, call getstats(false) instead if you have
    a truly enormous ustring table.
    lgritz committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    33c085d View commit details
    Browse the repository at this point in the history