rurban / smhasher

Hash function quality and speed tests
https://rurban.github.io/smhasher/
Other
1.84k stars 177 forks source link

Handle MIPS32 cycle counter overflow #292

Closed darkk closed 2 months ago

darkk commented 2 months ago

Unfortunately, 32-bit cycle counter overflows ≈ twice a minute, so some code is needed to distinguish between meaningful overflow (just add 1<<32 and get the result) and hardly-meaningful (do some math to get the result).

The code might be extended to get rid of timer_inf altogether, but it needs clock counter frequency accounting at a timer level and I'm somewhat reluctant to implementing that as this code seems to be good enough.