Page MenuHome

Optimize ghash using "fast range"
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Sun, Oct 6, 10:46 PM.

Details

Summary

Using the method described here:

https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/

In my tests this gives a modest speedup to ghash, in BLI_ghash_performance_test, best of 3:

  • Before: 1.453 seconds.
  • After: 1.285 seconds.

Diff Detail

Repository
rB Blender
Branch
TEMP-GHASH-SPEEDUP (branched from master)
Build Status
Buildable 5264
Build 5264: arc lint + arc unit

Event Timeline

On second thoughts, even though in some tests I found the distribution even, it doesn't work well when the hash is a small number.

In those cases it's always giving zero.

Abandoning for now.