Ancestors

Written by 斎藤ただし on 2024-09-21 at 18:06

今日はリンクリストとハッシュ関数 (xorshiftにしてみた) を書いた上でリサイズ・リハッシュに対応したハッシュテーブルをほぼ実装した。実装したので、あとはテストするだけだな、というフラグ

=> More informations about this toot | More toots from tadd@best-friends.chat

Toot

Written by 斎藤ただし on 2024-09-21 at 18:12

ていうか真面目に分かってないんですが、xorshiftってうまくバラけるハッシュ関数として使っていいの?

バラけるハッシュ関数をファイルとかが同じか見るのに使っちゃダメ、逆は遅いがまぁよい(Rustがやってる)、は分かるけど、乱数とかはどうなるんだろう

=> More informations about this toot | More toots from tadd@best-friends.chat

Descendants

Written by 斎藤ただし on 2024-09-21 at 18:35

正確にはxorshiftは、前回返した乱数(状態として記憶)から次の乱数を返す関数らしい。この連鎖を俯瞰すると次の数がとても予測しづらい(ばらばら)、だから乱数ということになるんだろうけど、ハッシュ関数としてなら連鎖は起こらないので、なんか違うのかも知れない

=> More informations about this toot | More toots from tadd@best-friends.chat

Written by 斎藤ただし on 2024-09-21 at 18:41

あっ、はい、やはりか https://news.ycombinator.com/item?id=29252921

=> More informations about this toot | More toots from tadd@best-friends.chat

Written by Masanori Ogino 𓀁 on 2024-09-21 at 18:49

@tadd https://github.com/rurban/smhasher

=> More informations about this toot | More toots from omasanori@mstdn.maud.io

Written by 斎藤ただし on 2024-09-22 at 04:18

@omasanori おお、情報ありがとうございます。何も知らなかったのでありがたいです。

なのですが、これは一体なんの表なのでしょうか?並んでるアルゴリズムも、いわゆる暗号学的なやつとそうでないのがごっちゃで、何を見るための表なのかがいまいち分かってないです。

=> More informations about this toot | More toots from tadd@best-friends.chat

Written by 斎藤ただし on 2024-09-22 at 04:40

@omasanori うーんごめんなさい、読み進めてもいまいち分からなかったんで質問させてください。

速度は分かるのですが、品質(分布)を表す指標は表のどれなのでしょうか?

この文章やハッシュ関数における「サイクル」というのが自分は分かっていなくて、それが入った2つの列の理解もあやふやです。

=> More informations about this toot | More toots from tadd@best-friends.chat

Written by Masanori Ogino 𓀁 on 2024-09-22 at 04:48

@tadd サイクルは(x86-64での)クロックサイクルのことです。品質についてはquality problemsに通過しなかったテストについて書かれていますが、定量的な指標は載っていません。rurban版については、表そのものというよりはその下の文章が参考になるかなと思います。

=> More informations about this toot | More toots from omasanori@mstdn.maud.io

Written by 斎藤ただし on 2024-09-22 at 05:43

@omasanori クロックサイクル、なるほど!理解しました。品質についても、もともと数字はないんですね。下の方ももっかい読んでみます、ありがとうございます。

=> More informations about this toot | More toots from tadd@best-friends.chat

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113176892193802149
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
280.990526 milliseconds
Gemini-to-HTML Time
3.942551 milliseconds

This content has been proxied by September (3851b).