c# - How to optimize SipHash for 32-bit architecture -
so new siphash provides fast secure prf (aka keyed hash function). use ch-siphash, seems fastest c# implementation around. quite amazing performance (1140 mb/s) on i7 3630qm in 64-bit, when switch 32-bit, performance drops 316 mb/s, (for purposes) terribly slow. siphash makes heavy use of 64-bit operations, maybe it's not surprising, know how can optimize algorithm 32-bit processors (notably intel , arm).
sha512 makes heavy use of 64-bit operations, yet on same pc 294 mb/s in 64-bit app, , 192 mb/s on 32-bit app, drop near significant.
so cool tricks , optimizations can make siphash perform better on 32-bit architectures? best implement hash in c++ dll (using sse), looking managed (portable - needs work on mobile phones desktop) solution.
some have implemented 32-bit version using sse3, performance not great either, maybe specific implementation done better.
there exists chaskey, prf heavily based on siphash, designed microcontrollers (32-bit , less). unlike siphash uses 2 rounds per block , 4 finalization rounds, chaskey uses 8 rounds per block , 8 finalization rounds. performance on cpu 2-3 times slower siphash in 32-bit mode, not way go.
Comments
Post a Comment