rurban / smhasher

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

wyhash compiled size #176

Closed wangyi-fudan closed 3 years ago

wangyi-fudan commented 3 years ago

Dear rurban: I am finishing wyhash paper with pushes from industry. I can not calculated the compiled size of hash function unless copying from your website. Current wyhash size is for the final_version_1. I guess the final_version_2 size is smaller. Would you update this number for me? Many thanks!

avaneev commented 3 years ago

You can estimate at godbolt.org for the given compiler - enable the compile to binary option.

wangyi-fudan commented 3 years ago

You can estimate at godbolt.org for the given compiler - enable the compile to binary option.

i got 344 bytes by godbolt. however, to make a fair comparision with other hash functions, I would like to hear from smhasher

avaneev commented 3 years ago

It depends on compiler options (smaller code for -Os or -O1, larger of -O3), and actual inlining/unrolling. In production it can be twice as large, depending on what compiler decides. So not too great an estimate anyway. It's actually even usually hard to find start/end of a function from binary output and what godbolt shows.

rurban commented 3 years ago

Ok, will do.

avaneev commented 3 years ago

i got 344 bytes by godbolt. however, to make a fair comparision with other hash functions, I would like to hear from smhasher

You've beaten my latest "minimal" hash function by about 10 bytes. However, I focus on security, and did a fair bit of research on this - but until it's published and peer-reviewed, of course, these are just author's claims.

rurban commented 3 years ago

Done. Indeed only half the size from last time. Default amd ryzen3 -march-native without AVX512, lto -O3 gcc-10