Реклама
Extra Hash Function Assessments
10-04-2023, 14:16 | Автор: KristyOToole | Категория: Игры PC
Extra Hash Function AssessmentsIn the earlier put up, I wrote about non-crypto hash functions, crypto-markets commission and did some performance exams. Turns out, it’s great to jot down about stuff! People at the feedback/twitter/internets identified more things I should check. So here’s a comply with-up submit. That is about algorithms for "hashing some quantity of bytes", for crypto-markets use either in hashtables or for checksum / uniqueness detection. Relying in your state of affairs, there’s a complete household of algorithms for that, and I'm specializing in just one: non-cryptographic fast hash features.

This put up is not about cryptographic hashes. Don't learn under if it is advisable hash passwords, sensitive knowledge going by means of untrusted medium and so forth. Use SHA-1, SHA-2, BLAKE2 and pals. Also, I’m not focusing on algorithms which can be designed to stop doable hashtable Denial-of-Service assaults. If one thing comes from the other facet of the web and finally ends up inserted into your hashtable, then to prevent possible worst-case O(N) hashtable habits you’re most likely off by using a hash perform that does not have known "hash flooding" assaults.

Extra Hash Function AssessmentsSipHash seems to be well-liked now.

In case you are hashing very small amounts of information of known measurement (e.g. single integers or two floats or no matter), you need to most likely use specialized hashing algorithms for these. Here are some integer hash capabilities, or 2D hashing with Weyl, or maybe you might take another algorithm and just specialize it’s code for your identified input measurement (e.g. xxHash for a single integer). I am testing 32 and 64 bit hash features right here.

For those who need bigger hashes, quite possible some of these functions may be suitable (e.g. SpookyV2 at all times produces 128 bit hash). When testing hash features, I haven't gone to nice lengths to get them compiling correctly or establishing all the magic flags on all my platforms. If some hash function works wonderfully when compiled on Linux Itanium field with an Intel compiler, that’s great for you, but if it performs poorly on the compilers I happen to use, I can't sing praises for it.

Being in the video games industry, I care about things like "what occurs in Visual Studio", and "what occurs on iOS", and "what happens on PS4".

Extra hash function exams! I checked each "hashing knowledge that is aligned" (16-byte aligned handle of data to hash), and unaligned knowledge. In every single place I tested, there wasn’t a notable efficiency distinction that I could discover (however then, I have not tested old ARM CPUs or PowerPC based ones). The only visible impact is that MurmurHash and SpookyHash don’t properly work in asm.js / Emscripten compilation targets, attributable to their usage of unaligned reads.

I’d assume they most likely don’t work on some ARM/PowerPC platforms too.
Скачать Skymonk по прямой ссылке
Просмотров: 22  |  Комментариев: (0)
Уважаемый посетитель, Вы зашли на сайт kopirki.net как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.